Skip to Content
0
May 01, 2014 at 08:36 PM

How to capture service text with po items.

56 Views

Dear Friends

I have two PO item 10 and 20 ( EKPO), which have 4 and 2 services items in ESLL table. I have two internal tables and I want to merge this information in single internal table. I have tried following way, but didnt helped me much.


I have attached screen shot / code / expalaination of problem with this message.

I am requesting you to please explain me how I can make this code work-able. I will greatly appreciate your any help.

Thanking you

Regards

Naim

My Code

SORT it_ser by ebeln ebelp_ekpo ASCENDING.

LOOP AT IT_SER INTO WA_SER WHERE BSART = 'ZSRV'.

* Service Line edition starts here.

CALL FUNCTION 'BAPI_PO_GETDETAIL1'

EXPORTING

purchaseorder = wa_ser-ebeln

services = 'X'

TABLES

return = it_return

poservices = it_services.

IF it_services IS NOT INITIAL.

AT NEW EBELP_EKPO.

LOOP AT it_services INTO wa_services WHERE outl_ind NE 'X'.

wa_ser-menge_ekpo = wa_services-quantity.

wa_ser-meins_ekpo = wa_services-base_uom.

wa_ser-netwr = wa_services-gr_price.

wa_ser-txz01_ekpo = wa_services-short_text.

MODIFY it_ser FROM wa_ser.

CLEAR wa_services.

ENDLOOP.

endat.

endif.

CLEAR: wa_services, it_services.

Please see the images. I want to add all the services with po details in single table.

Attachments