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

update Acct asgnmt grp(VBAP-KTGRM) using BAPI_SALESORDER_CREATEFROMDAT2

0 Likes
4,471

Hi Experts,

could you please suggest how to update Account assignment group (VBAP-KTGRM) using BAPI_SALESORDER_CREATEFROMDAT2, I am using this BAPI to create a Sales order from the program and I want to update VBAP-KTGRM field from Z table based on some condition, I found a paramenter BAPISDITM-ACCNT_ASGN in the BAPI but it is not updating the field, could you please suggest how to do it.

I tried in MV45AFZZ exit also for the possibility but it is not stopping from BAPI, as an alternate I am using BDC to change the Sales order (VA02) recording after SO is created but the client is not happy with this, please help.

Thanks in advance.

Ramakrishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,762

Hi Ramakrishna,

I think you need to pass this VBAP-KTGRM(Acct assignment group for material) as a parameter under extensionin parameter of the BAPI 'BAPI_SALESORDER_CREATEFROMDAT2.'

Go through the below link on how to do this, it is much clearly explained under Raymond sir's answer.

fm to change KTGRM of sales order | SCN

Hope this is helpful to you.

Regards

Pallavi

Hi Experts,

could you please suggest how to update Account assignment group (VBAP-KTGRM) using BAPI_SALESORDER_CREATEFROMDAT2, I am using this BAPI to create a Sales order from the program and I want to update VBAP-KTGRM field from Z table based on some condition, I found a paramenter BAPISDITM-ACCNT_ASGN in the BAPI but it is not updating the field, could you please suggest how to do it.

I tried in MV45AFZZ exit also for the possibility but it is not stopping from BAPI, as an alternate I am using BDC to change the Sales order (VA02) recording after SO is created but the client is not happy with this, please help.

Thanks in advance.

Ramakrishna

4 REPLIES 4
Read only

Former Member
0 Likes
2,762

HI,

Please move Account assignment group value to

header_in-ACCNT_ASGN  &

header_inx-ACCNT_ASGN = 'X'.

Regards .

Palaniyappan.S

Read only

Former Member
0 Likes
2,763

Hi Ramakrishna,

I think you need to pass this VBAP-KTGRM(Acct assignment group for material) as a parameter under extensionin parameter of the BAPI 'BAPI_SALESORDER_CREATEFROMDAT2.'

Go through the below link on how to do this, it is much clearly explained under Raymond sir's answer.

fm to change KTGRM of sales order | SCN

Hope this is helpful to you.

Regards

Pallavi

Read only

0 Likes
2,762

Read only

0 Likes
2,762

Hi Pallavi,

its working with BAPI Extension. great. thanks a lot.

I thought the extensions should be used only for custom fields