06-29-2015 6:36 AM
Hi,
I need to validate PO Service Items,
I have got a BADI - ME_PROCESS_PO_CUST,
However I am not able to get Service Data(ESLL) in it.
I have also gone through Exit - SRVESLL - EXIT_SAPLMLSP_031
In this I am not able to EKKO and EKPO data,
Please Suggest,
Regards,
Pavan.
06-29-2015 7:10 AM
You Can Read the Global data using field symbol for (SAPLMEPO)EKPO. or (SAPLME02)GT_EKPO[].
Use this in EXIT_SAPLMLSP_031.
The second one might not contain the data at the time initially.
Hope this helps.
06-29-2015 6:57 AM
hi,
YOU may not get every thing in every where at the time of Enhancement.
So first trace sequence of exit,badi,badi-method for your process. then take the help of ABAP memory that is export import parameter which will help you to get required data in one session .
I will try to give some more appropriate solution in this subject.
Hope this will help you
06-29-2015 7:10 AM
You Can Read the Global data using field symbol for (SAPLMEPO)EKPO. or (SAPLME02)GT_EKPO[].
Use this in EXIT_SAPLMLSP_031.
The second one might not contain the data at the time initially.
Hope this helps.
06-29-2015 7:13 AM
Hi,
Thanks for the reply,
Can you help out with syntax.
Regards,
Pavan.
06-29-2015 7:27 AM
Hi ,
The syntax would be as below:
field-symbols : <fs_ekpo> type any table, "ekpo,
FFIELD-SYMBOLS: <FS_ekpo> TYPE ekpo.
data: wa_ekpo type ekpo,
lt_ekpo type standard table of ekpo,
assign ('(SAPLMEPO)EKPO') to <fs_ekpo>.
if <fs_ekpo> is assigned .
wa_ekpo = <fs_ekpo1>.
endif.
For table it would be:
assign ('(SAPLME02)GT_EKPO[]') to <fs_ekpo>.
if <fs_ekpo> is assigned .
lt_ekpo[] = <fs_ekpo>.
endif.
Hope this helps.
06-29-2015 7:54 AM
Hi,
Can you please tell me how could I get EKKO data..
Regards,
Pavan.
06-29-2015 8:07 AM
The same way you got EKPO.
FFIELD-SYMBOLS: <FS_ekpo> TYPE ekpo.
data: wa_ekko type ekko.
assign ('(SAPLMEPO)EKKO') to <fs_ekko>.
if <fs_ekko> is assigned .
wa_ekko = <fs_ekko>.
endif.
Hope this helps.
06-29-2015 7:23 AM
During your search did you find my answer in MM me21n service part user field.Please helppp?
Regards,
Raymond
06-29-2015 10:13 PM
Hi Pavan,
Using the ABAP stack '(SAPLMEPO)EKKO' you can achieve your requirement, as suggest by Gaurav.
But as suggested by Raymond Giuseppi, using the standard class methods provided by SAP is the recommended way.
* Check the working code below for the ESLL data (also see the sceenshot for run time sample data).
DATA: ls_poheader TYPE mepoheader,
lt_poitem TYPE purchase_order_items,
ls_items TYPE purchase_order_item,
lt_esll TYPE mmsrv_esll,
ls_item_data TYPE mepoitem,
lr_item TYPE REF TO cl_po_item_handle_mm.
ls_poheader = im_header->get_data( ).
lt_poitem = im_header->get_items( ).
LOOP AT lt_poitem INTO ls_items.
ls_item_data = ls_items-item->get_data( ).
mmpur_dynamic_cast lr_item ls_items-item.
* Then use methods of IF_SERVICES_MM interface to get service information
CALL METHOD lr_item->if_services_mm~get_srv_data
EXPORTING
im_packno = ls_item_data-packno
IMPORTING
ex_esll = lt_esll.
ENDLOOP.
Regards,
Raju.