ME22N执行BDC出错 ME22N BDC error

ME22N这种新的TCODE因为有新的控件在屏幕上,所以执行BDC会出错。
解决办法就是用BAPI或者ME22老TCODE来做。
具体请见http://sapfans.com/forums/viewtopic.php?t=272362&view=next&sid=3fe9a01071e5e08614ed42b46beaca50

Hi All,

I am using a report to update confirmation control in ME22N through BDC.
If i run the report in foreground it works fine and the conf contrl has been updated. But while running the report in Background mode(Program->Execute in Background) record has not been updated and spool is created with the below error Msg.

Unable to initialise ABAP Control
Control Framework: Fatal error -
Runtime error RAISE_EXCEPTION has occured


Please can you help to overcome this and thanks in advance.

ME22N being enjoy transaction, is not suitable for BDC. Also, it uses some frontend controls, which are not available in background mode.
Use BAPI_PO_CHANGE, which works nice.
In case you must use BDC, use transaction ME22.


(1) 评论    (13) 引用   

如何得到系统table和自定义type的信息

How to get info of system table or the type we defined in program?
Please refer follwing codes i wrote, we can leverage two FM.

REPORT zdavid_component .

TYPES: BEGIN OF t_typ,
line TYPE char100,
END OF t_typ.
DATA: wa_typ TYPE t_typ,
it_typ TYPE TABLE OF t_typ,
it_data TYPE TABLE OF t_typ.

wa_typ-line = '1111'.
APPEND wa_typ TO it_typ.

DATA: tbl_name TYPE x030l-tabname,
it_flds TYPE TABLE OF rfc_fields.
tbl_name = 'MARA'.

CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
EXPORTING
tabname = tbl_name
TABLES
data = it_data
fields = it_flds
EXCEPTIONS
dp_invalid_table = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

DATA: it_components TYPE TABLE OF rstrucinfo.
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = sy-repid
fieldname = 'wa_typ'
TABLES
components = it_components.

WRITE 'End'.


(0) 评论    (96) 引用