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

VA42 function module to change Target value

thomasmakkink
Explorer
0 Likes
4,070

Hi all,

We have our own transaction where we want to be able to change the "Target value" in a contract (as in transaction VA42).

I have looked around, and all answers for modifying in VA42 revolve around BAPI_SALESORDER_CHANGE or BAPI_CUSTOMERCONTRACT_CHANGE. But none of these has a field of the same type as the field I want to change.
I also tried debugging the transaction by setting a break point on command "CALL FUNCTION" but it takes for ever...

Any help would be appreciated.

1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
3,576

Hi thomasmakkink,

Try this BAPI,

BAPI_CONTRACT_CHANGE

Check in the export parameter you have fields to populate the target Value.

Regards

5 REPLIES 5
Read only

former_member1716
Active Contributor
3,577

Hi thomasmakkink,

Try this BAPI,

BAPI_CONTRACT_CHANGE

Check in the export parameter you have fields to populate the target Value.

Regards

Read only

0 Likes
3,576

Hi,

I don't see it there. Also not sure that that BAPI is for the "type" of contract I'm using. Not exactly sure functionally what kind of contract I'm talking about, maybe it's a sales document.

Anyways, your function module takes PURCHASINGDOCUMENT of type EBELN, but I'm using a SALESDOCUMENT of type VBELN_VA (as in Transaction VA42).

Read only

VeselinaPeykova
Active Contributor
3,576

I am confused - what is wrong with using TARGET_VAL in CONTRACT_ITEM_IN in BAPI_CUSTOMERCONTRACT_CHANGE?

Just convert your variable to the format required by the BAPI.

I used a SE37 sequence and it works just fine...

Read only

0 Likes
3,576

This is indeed working for me, thank you

Read only

Jelena_Perfiljeva
Active Contributor
3,576

This seems to have been answered, please close the question.