Application Development and Automation 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: 
Read only

Updating Customer fields using BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Likes
1,998

Hi,

How do I use FM: BAPI_ALM_ORDER_MAINTAIN to update a Customer Field 'XYZ' of table AUFK ??

(Customer include: CI_AUFK has been used to add the customer field.)

Please suggest a pseudo code.

Points will be promptly rewarded for all useful answers.

Thanks,

S.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,303

1. Check if your BAPI has EXTENSIONIN and EXTENSIONX paremeters ( Reference structure for BAPI parameters EXTENSIONIN/EXTENSIONOUT).

2. Then you append your custom field to the structure provided for this BAPI.

3. Pass these structures to EXTENSIONIN and EXTENSIONX parameters of BAPI in the program.

Thanks,

Santosh

Hi,

How do I use FM: BAPI_ALM_ORDER_MAINTAIN to update a Customer Field 'XYZ' of table AUFK ??

(Customer include: CI_AUFK has been used to add the customer field.)

Please suggest a pseudo code.

Points will be promptly rewarded for all useful answers.

Thanks,

S.

6 REPLIES 6
Read only

Former Member
0 Likes
1,304

1. Check if your BAPI has EXTENSIONIN and EXTENSIONX paremeters ( Reference structure for BAPI parameters EXTENSIONIN/EXTENSIONOUT).

2. Then you append your custom field to the structure provided for this BAPI.

3. Pass these structures to EXTENSIONIN and EXTENSIONX parameters of BAPI in the program.

Thanks,

Santosh

Read only

0 Likes
1,303

The BAPI contains the table EXTENSION_IN of structure BAPIPAREX.

BAPIPAREX has the following fields:

STRUCTURE CHAR 30 Structure name of BAPI table extn.

VALUEPART1 CHAR 240 Data part of BAPI extension parameter

VALUEPART2 CHAR 240 Data part of BAPI extension parameter

VALUEPART3 CHAR 240 Data part of BAPI extension parameter

VALUEPART4 CHAR 240 Data part of BAPI extension parameter

I tried to pass value 'CI_AUFK' to STRUCTURE field and values of all the Custom fields in a continuous character sequence to VALUEPART1.

This is not working. Am I missing something. (I have ofcourse use a BAPI commit)

Thanks,

S.

Read only

0 Likes
1,303

Dont you have EXTENSIONINX structure? I hope you did this?

I believe there will be another structure for e.g. For BAPI_MATERIAL_SAVEDATA, we have BAPI_TE_MARA and BAPI_TE_MARAX structures. In these structures we add custom fields (in your case CI_AUFK) and pass this structure name as following:

MOVE 'BAPI_TE_MARA' TO BAPIREX-STRUCTURE.

MOVE 'BAPI_TE_MARAX' TO BAPIREXX-STRUCTURE.

MOVE X_BAPI_TE_MARA TO BAPIREX-VALUEPART1.

MOVE X_BAPI_TE_MARAX TO BAPIREXX-VALUEPART1.

So i am not sure how your BAPI works. If you still face problem, i suggest you search with 'bapi extensions' in this forum and you will get many threads OR you may paste code here.

Thanks,

Santosh

Read only

0 Likes
1,303

Hi Santosh,

You were right, I did find a structure called "BAPI_TE_AUFK" (although nothing about this is mentioned in the elaborate documentation !!).

I did exactly as u said, n i feel i am very close to my goal, but not yet there.

Do u think I maybe not passing data correctly to the IT_METHODS (mandatory)structure ??

Also here's something i noticed (if it helps):

On debugging the BAPI i found that the only place the EXTENSION_IN structure is referred to is in a BADI call. However all this BADI can do is map this structure onto one of the existing structures. Unfortunately for me this particular field does not exist on any of these structures.

Thanks,

S.

Read only

0 Likes
1,303

Ok. If you should also find another structure BAPI_TE_AUFKX. And you need to append your custom fields into these structure.

In the second structure, i.e BAPI_TE_AUFKX you should declare the same customer fields with CHAR 1.

In the program you need to pass this structure as i mentioned above. You may paste your code.

Thanks,

Santosh

Read only

0 Likes
1,303

Hi Samarth,

I have the same requirement as yours.

I have to update the customer fields using bapi BAPI_ALM_ORDER_MAINTAIN.

Kindly help me in this in sending the procedure to do that

Thanks and Regards\

Rajesh