‎2010 Sep 06 7:59 AM
Hi ,
All ABAP Gurus
I want to use a function module WS_DELIVERY_MONITOR which should give the VBELN on the basis of CHARG in internal table so that on the basis of VBELN I can fulfil further requirement and display the final output in ALV.
But this function module when executed display an ALV.
My requirement is that it should retrieve all the VBELN on the basis of CHARG (which is in the internal table and is passed to the function module) in an internal table and do not display the ALV so that when all the VBELN come in internal table then I can perform further calculation.
Please guide me in this matter.
Thanks & Regards
Bharti Jain
‎2010 Sep 06 1:47 PM
Hi Bharti,
Please try calling FM 'WS_LM_DATA_SELECTION' instead. This FM is callled inside main FM 'WS_DELIVERY_MONITOR' and is used to fetch data. You will only need to fill extra import parameter for using this FM ( if_flag_inbound) and two changing tables (lt_postab) and ( lt_postab_kodat), which will have results. 'if_flag_inbound' field will be having value X for all inbound cases.
I have used the same FM to get open deliveries:
CALL FUNCTION 'WS_LM_DATA_SELECTION'
EXPORTING
if_proctype = c_proc_type_f
TABLES
it_matnr = i_deliv_matnr
it_lgort = i_deliv_lgort
it_lfart = i_deliv_type
it_kostk = i_deliv_kostk
it_wbstk = i_deliv_wbstk
ct_postab = i_deliv_nos
CT_POSTAB_KODAT =
EXCEPTIONS
no_data_found = 1
wrong_proc_type = 2
OTHERS = 3 .
IF sy-subrc = 0.
**-Calculate open delivery quantity
LOOP AT i_deliv_nos INTO wa_deliv_nos
WHERE NOT posnr IS INITIAL.
pc_open_deliv_qty = pc_open_deliv_qty + wa_deliv_nos-lfimg.
ENDLOOP.
ENDIF.
<removed by moderator>
Edited by: Thomas Zloch on Sep 7, 2010 9:06 AM - please do not ask for ...
‎2010 Oct 13 3:56 AM