on 2012 Jan 31 10:22 AM
Hello,
I have the folowing problem:
I want to transfer custer fields into the BE PO on item level (fields will in EKPO). On SRM side I have a PO with service items. For some reason this does not work.
SRM 7.0, ext. classic
BE: ECC6.0, SAP_BASIS 7.01
Structures enhanced:
INCL_EEW_PD_ITEM
INCL_EEW_PD_ITEM_CSF_PO
The customer fields get filled in BADI BBP_DOC_CHANGE_BADI.
When the enhancement structures are checked (function: BBP_PDO_TO_BAPI_MAP) I can see that the customer field table is filled with a corresponding line to my custer field but with reference object POSERVICE but not with POITEM as I would expect.
I already have FBGENDAT function active and running but I'm still looking for the place where the customer fields will be mapped into the EXTENSIONIN structure.
Does anyone of you has experience with service items in a PO and the data transfer?
Kind regards,
Thomas
Request clarification before answering.
Hi Thomas,
Have you already checked the Consulting Note 647323 ?
647323 CUF Transfer customer-specific fields to R/3 Backend system
Have you tried to use the Badi BBP_ECS_PO_OUT_BADI ?
Basically the intention is to send customer fields for POSERVICES as follows from SRM itself:
refobject - POITEM
reffield1 - PO_ITEM
refval1 - Corresponding limit item number of the guid.
The logic could be the following:
LOOP CT_BAPI_CUSTOMER_FIELDS INTO IS_BAPI_CUSTOMER_FIELDS
WHERE REFOBJECT = 'POSERVICES'
READ TABLE IT_ITEM INTO is_item with key guid =
is_bapi_cusotmer_fields-guid itm_type = 'LIMI'
IF sy-subrc IS INITIAL.
is_bapi_customer_fields-refobject = 'POITEM'.
is_bapi_customer_fields-reffield1 = 'PO_ITEM'.
is_bapi_customer_fields-reffield1 = is_item-number_int.
MODIFY ct_bapi_customer_fields from is_bapi_customer_fields.
ENDIF.
ENDLOOP.
Kindly Regards,
Rafael Rhoden
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
I checked the note 647323 but this is only valid for older releases up to BBP/CRM 4.0 my customer is currently on SRM 7.0
As BADI we use 'BBP_ECS_PO_OUT_BADI' (method BBP_B46B_PO_OUTBOUND) to fill the BAPI structures.
The container for the customer fields is filled as follows:
clear ls_cust.
ls_cust-fieldname = 'YYPERIOD'.
ls_cust-refobject = 'POITEM'.
ls_cust-reffield1 = 'PO_ITEM'.
ls_cust-refval1 = ls_item-number_int+5.
ls_cust-container = lv_period. <- This contains the period of the service line
append ls_cust to ct_bapi_customer_fields.
Remove existing entry YYPERIOD / POSERVICES (it was created because of the service item line)
loop at ct_bapi_customer_fields into ls_cust
where fieldname = 'YYPERIOD'
and refobject = 'POSERVICES'.
delete ct_bapi_customer_fields index sy-tabix.
endloop.
So I will end up with an entry for
POITEM / PO_ITEM.
In the BE the function BBP_PO_INBOUND is called in first place which prepares the data for function module BAPI_PO_CREATE1. In the testdata directory I find a record with the following entries (they correspond to a PO in SRM with 2 service items)
POHEADER - 1 Header entry
POITEM - 2 Item lines
00001 Services 5000 (Plant) 1AA (Prod.Cat) 0 (Qty) LE (Unit) 253,00 (NetPrice) 0000000002 (PCKG_NO)
00002 - empty -
POSERVICES - 3 Lines
PCKG_NO LINE_NO SUBPCKG_NO QTY UNIT
0000000002 0000001 0000000003 0
0000000003 0000002 11 LE
0000000003 0000003 12 LE
POSRVACCESSVALUES
PCKG_NO LINE_NO
0000000003 00000002 100,0
0000000003 00000003 100,0
EXTENSIONIN - 6 Lines
Structure
BAPI_TE_MEPOHEADER
BAPI_TE_MEPOHEADERX
BAPI_TE_MEPOITEM
BAPI_TE_MEPOITEMX
BAPI_TE_MEPOITEM
BAPI_TE_MEPOITEMX
The PO won't be created because of 'missing accounting information for item 2'. Why is item 2 treated like a material item line? What is wrong?
Kind regards,
Thomas
Note 647323 - helpful
In target structure ESLL there are already customer fields for numeric and character values:
- USERF1_NUM - Numc, 10
- USERF2_NUM - Quan, 13,3
- USERF1_TXT - Char, 10
- USERF2_TXT - Char, 40
These fields can be activatet in the table control for the service lines (Leistungszeilen)
Don't move 'item/service information' in the customer field extension unless you have corresponding accounting information that goes with it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.