Professional Documents
Culture Documents
upload_ole
= 2
others
= 3.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
perform final_table1.
perform fill_final_table.
delete adjacent duplicates from it_final1 comparing all fields.
loop at it_final1.
refresh it_bdcdata[].
perform bdc using : 'SAPMF05L'
'0100'
'X',
'BDC_OKCODE' '/00'
' ',
'RF05L-BELNR' it_final1-belnr
' ',
'RF05L-BUKRS' it_final1-bukrs
' ',
'RF05L-GJAHR' it_final1-gjahr
' ',
'SAPMF05L'
'0700'
'X',
'BDC_OKCODE' '=AE'
''.
call transaction 'FB02' using it_bdcdata
mode mode
messages into it_messtab.
endloop.
*&---------------------------------------------------------------------*
*&
Form FINAL_TABLE
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form final_table1 .
clear it_final1.
refresh it_final1[].
loop at excell_tab.
if excell_tab-col = 1.
it_final1-bukrs = excell_tab-value.
elseif excell_tab-col = 2.
it_final1-belnr = excell_tab-value.
elseif excell_tab-col = 3.
it_final1-gjahr = excell_tab-value.
endif.
at end of row.
append it_final1.
clear it_final1.
endat.
endloop.
endform.
" FINAL_TABLE
*&---------------------------------------------------------------------*
*&
Form FILL_FINAL_TABLE
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form fill_final_table .
clear it_final.
refresh it_final[].
loop at excell_tab.
if excell_tab-col = 1.
it_final1-bukrs = excell_tab-value.
elseif excell_tab-col = 2.
it_final1-belnr = excell_tab-value.
elseif excell_tab-col = 3.
it_final1-gjahr = excell_tab-value.
endif.
at end of row.
append it_final1.
clear it_final1.
endat.
endloop.
endform.
" FILL_FINAL_TABLE
*&---------------------------------------------------------------------*
*&
Form BDC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*
-->P_0210
text
*
-->P_0211
text
*
-->P_0212
text
*----------------------------------------------------------------------*
form bdc using
val1 val2 flag.
clear it_bdcdata.
if flag = 'X'.
it_bdcdata-program
it_bdcdata-dynpro
it_bdcdata-dynbegin
else.
it_bdcdata-fnam
=
it_bdcdata-fval
=
endif.
append it_bdcdata.
= val1.
= val2.
= 'X'.
val1.
val2.
endform.
" BDC