Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Batch input MB26 transaction does not work

former_member493530
Participant
0 Kudos

Hi experts,

I need implement a batch input to MB26 transaction, I make a recording in SM35 transaction and use the following code:

PERFORM add_bdc USING :

             'X' 'PP_PICK_LIST'            '5000',

             ' ' 'BDC_CURSOR'              'S_AUFNRA-LOW',

             ' ' 'BDC_OKCODE'              '=ONLI',

             ' ' 'S_AUFNRA-LOW'            PRODUCTION_ORDER,

             'X' 'SAPLCOWB'                '0130',

             ' ' 'BDC_OKCODE'              '=MALL',

             ' ' 'BDC_SUBSCR'              'SAPLCOWB                                0001HEADER',

             ' ' 'BDC_SUBSCR'              'SAPLCOWB                                0580TABLE',

             ' ' 'BDC_CURSOR'              'COWB_COMP-MAKTX(01)',

             'X' 'SAPLCOWB'                '0130',

             ' ' 'BDC_OKCODE'              '=WEIT',

             ' ' 'BDC_SUBSCR'              'SAPLCOWB                                0001HEADER',

             ' ' 'BDC_SUBSCR'              'SAPLCOWB                                0580TABLE',

             ' ' 'BDC_CURSOR'              'COWB_COMP-MAKTX(01)'.

        CALL FUNCTION 'ABAP4_CALL_TRANSACTION'

          EXPORTING

           tcode = 'MB26'

           mode_val = 'E'

           update_val = 'S'

          TABLES

           using_tab  = t_bdc

           spagpa_tab = itab_spa

           MESS_TAB   = imsg_tab.

But it don´t work, please you can help me.

Best regards,

Robert

2 REPLIES 2

PeterJonker
Active Contributor
0 Kudos

Why it doesn't work ? You get a shortdump ?

What is in the messages (imsg_tab)?

Did you try with Mode A (Display all) and debug ?

0 Kudos

Hi Peter,

The execution is ok (sy-subrc  = 0) and mess_tab is empty (this in debug mode), but in CO02 transaction the component is not consumed and and if I return to use the same production order in transaction MB26 (no batch input) allows me to process it.