Skip to Content
author's profile photo Former Member
Former Member

Load Massive

Good day experts, in a previous request help with a topic for bulk load report, 'but now I have another request to the same report. Should massive load some data that I get from the CO11N transaction, I need your help in obtaining the value of the notification field, this value is obtained after entering the values ​​in the order and operation field, enter is pressed and displayed the data in the notification area.




I'm using this code, I hope you can help.



LOOP AT ti_input INTO st_input.
CLEAR:st_de_data.
MOVE: st_input-aufnr TO st_de_data-aufnr,
st_input-vornr TO st_de_data-vornr,
st_input-budat TO st_de_data-budat,
st_input-rueck TO st_de_data-rueck.

REFRESH:ti_return,ti_return_data,ti_stock,ti_return,ti_status,ti_user.

PERFORM bdc_dynpro USING :
'X' 'SAPLCORU_S' '0100',
' ' 'BDC_OKCODE' '/00',
' ' 'AFRUD-RUECK' st_de_data-rueck,
' ' 'AFRUD-AUFNR' st_de_data-aufnr,
' ' 'AFRUD-VORNR' st_de_data-vornr,
' ' 'AFRUD-BUDAT' st_de_data-budat.


PERFORM bdc_dynpro USING :
'X' 'SAPLCORU_S' '0100',
' ' 'BDC_CURSOR' '/00',
' ' 'AFRUD-RUECK' st_de_data-rueck,
' ' 'AFRUD-VORNR' st_de_data-vornr,
' ' 'AFRUD-BUDAT' st_de_data-budat.


PERFORM bdc_dynpro USING :
'X' 'SAPLCORU_S' '0100',
' ' 'BDC_OKCODE' '=BU',
' ' 'AFRUD-AUFNR' st_de_data-aufnr,
' ' 'AFRUD-VORNR' st_de_data-vornr,
' ' 'AFRUD-BUDAT' st_de_data-budat,
' ' 'AFRUD-RUECK' st_de_data-rueck.


ENDLOOP.

s_opt-dismode = c_mod.
s_opt-updmode = c_update.
s_opt-nobinpt = 'X'.

CALL TRANSACTION 'CO11N' USING it_bdc_tab[]
OPTIONS FROM s_opt
MESSAGES INTO it_messtab[].


Best regards friends.

pastedImage_0.png (52.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2014 at 02:08 PM

    Good day I just had to modify the code and I am this way, I can now record, thanks ....


    LOOP AT ti_input INTO st_input.
    CLEAR:st_de_data.
    MOVE: st_input-aufnr TO st_de_data-aufnr,
    st_input-vornr TO st_de_data-vornr,
    st_input-budat TO st_de_data-budat,
    st_input-zzcant1 TO st_de_data-zzcant1,
    st_input-zzmot1 TO st_de_data-zzmot1,
    st_input-zzcant2 TO st_de_data-zzcant2,
    st_input-zzmot2 TO st_de_data-zzmot2,
    st_input-zzcant3 TO st_de_data-zzcant3,
    st_input-zzmot3 TO st_de_data-zzmot3,
    st_input-zzcant4 TO st_de_data-zzcant4,
    st_input-zzmot4 TO st_de_data-zzmot4,
    st_input-ltxa1 TO st_de_data-ltxa1,
    st_input-rueck TO st_de_data-rueck.


    DATA: l_budat(10) TYPE c,
    l_result(10) TYPE c.
    l_budat = st_de_data-budat.
    CONCATENATE l_budat+6(2)'.'l_budat+4(2)'.'l_budat+0(4) INTO l_result.

    PERFORM bdc_dynpro USING :
    'X' 'SAPLCORU_S' '0100',
    ' ' 'BDC_OKCODE' '/00',
    ' ' 'AFRUD-RUECK' st_de_data-rueck,
    ' ' 'AFRUD-AUFNR' st_de_data-aufnr,
    ' ' 'AFRUD-VORNR' st_de_data-vornr,
    ' ' 'AFRUD-BUDAT' l_result. "Fecha

    PERFORM bdc_dynpro USING :
    'X' 'SAPLCORU_S' '0100',
    ' ' 'BDC_OKCODE' '=BU', "Grabar
    ' ' 'AFRUD-AUFNR' st_de_data-aufnr,
    ' ' 'AFRUD-VORNR' st_de_data-vornr,
    ' ' 'AFRUD-BUDAT' l_result,
    * ' ' 'AFRUD-ZZCANT1' st_de_data-zzcant1,
    * ' ' 'AFRUD-ZZMOT1' st_de_data-zzmot1,
    * ' ' 'AFRUD-ZZCANT2' st_de_data-zzcant2,
    * ' ' 'AFRUD-ZZMOT2' st_de_data-zzmot2,
    * ' ' 'AFRUD-ZZCANT3' st_de_data-zzcant3,
    * ' ' 'AFRUD-ZZMOT3' st_de_data-zzmot3,
    * ' ' 'AFRUD-ZZCANT4' st_de_data-zzcant4,
    * ' ' 'AFRUD-ZZMOT4' st_de_data-zzmot4,
    ' ' 'AFRUD-RUECK' st_de_data-rueck.


    s_opt-dismode = c_mod.
    s_opt-updmode = c_update.
    s_opt-nobinpt = ' '.

    ENDLOOP.

    CALL TRANSACTION 'CO11N' USING it_bdc_tab[]
    OPTIONS FROM s_opt
    MESSAGES INTO it_messtab[].

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 03:20 PM
    • From AUFNR read table AFKO with AUFNR to get AUFPL.
    • Then from AUFPL and VORNR read table AFVC to get RUECK and RMZHL
    • Then from RUECK and RMZHL read table AFRU

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.