Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CREATE1: customer fields via extensionin

Former Member
0 Kudos

Hi all,,

I have a problem with creation a PO with services containing as well customer fields in ESLL-Include CI_ESLLDB! I activated the enhancement SRVDET and added some new fields on the customer screen!

It works very well, but when I want to create a PO via BAPI_PO_CREATE1 I don't have the chance to pass these customer fields! Only PO_HEADER, PO_ITEM and PO_ACCOUNTING is possible via BAPI-Table extensionin!

Any ideas?

Greetings Günter

8 REPLIES 8

Former Member
0 Kudos

Hi Guenterlidl,

Check these links for your queries,

[Link1|]

[Link2|]

[Link3|]

[Link4|]

Thanks & regards,

Dileep .C

0 Kudos

Sorry, but these links will not solve my problem, because they describe extensions of ekko and ekpo and/or ekkn which works! But there is no solution to fill ESLL-customer include!

Could it be that there is a lack :-)?

Greetings

Günter

0 Kudos

Hi Günter,

check this

DATA: LV_PONUMBER LIKE BAPIMEPOHEADER-PO_NUMBER,

LT_POSERVICES LIKE BAPIESLLC OCCURS 0 WITH HEADER LINE. " BAPIESLLC = ESLL

CLEAR: GV_PONUMBER.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

POHEADER = LS_POHEADER

POHEADERX = LS_POHEADERX

TESTRUN = P_TEST

IMPORTING

EXPPURCHASEORDER = GV_PONUMBER

TABLES

RETURN = LT_RETURN

POITEM = LT_POITEM

POITEMX = LT_POITEMX

POSCHEDULE = LT_POSCHED

POSCHEDULEX = LT_POSCHEDX

POSERVICES = LT_POSERVICES .

IF NOT GV_PONUMBER IS INITIAL.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

WRITE: / 'Purchase Order No. : '(011).

Else.

Error message

endif.

Also Check this MS_MOVE_BAPIESLL_TO_ESLL

Thanks & regards,

Dileep .C

0 Kudos

Did u try with these structures BAPIESLLC or BAPI_ESLL or BAPIESLL while filling the Extensionin table?

Rhea.

0 Kudos

Hi all,

thanks a lot for your fast responses!

The problem is when activating the CMOD-Enhancement SRVDET you have to add your own fields in Include CI_ESLLDB which forwards these fields to table ESLL! After this you can extend your service screen in ME21N and so on! So far so good, this is working! But ....

when creating and/or changing a PO using the BAPI-function module BAPI_PO_CREATE1 there is no chance to fill these customer fields, because

1) inbound structure POSERVICES is of type BAPIESLLC which doesn't include CI_ESLLDB

2) Extensionin-table handles only HEADER, ITEM and accounting, but no services

Maybe it is not possible to fill thode customer field via standard way, so I have to create somewhere an enhancement!

The problem is that to pass the customer fields w/o modification is the tabel extensionin! But there is no chance to map them to ESLL, because there is on procedure which maps services using the inbound table poservices (which doesn't include customer fields) and changing parameter of the procedure is lt_esll (which includes customer fields)! But to this procedure the table extensionin is not passed!

So maybe I make an enhancement at the end of procedure move_data_in in Include L2012F01 to extend the table lt_esll! But I fear there is no other way!

Are you with me?

Greetings

Günter

0 Kudos

Check this [Thread|;

may be helpful for you.

Rhea.

0 Kudos

Hi all,

thanks a lot for your replies!

I solved the problem by adding some enhancements!

SAP standard function module is not able to fill customer fields on ESLL level so an own coding is necessary!

Greetings

Günter

0 Kudos

HI Günter, I have the same problem, pls could you tell me what enhacements did you use?

Thank in advance.

Priscila