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

How to overwrite passed parameters to 'BAPI_CONTRACT_CREATEFROMDATA'

srikanth_d4
Participant
0 Likes
913

Hello,

I have created an enhancement in MOVE_FIEDL_TO_VBAP user exit to provide some default value to the line item VKAUS field (vbap-vkaus), but I have a test program to create sales order which internally calling a BAPI, but while calling I am passing a value to the vbap-vkaus field in the test program but according to logic it should overwrite the passes value with the user exit logic, but this is not happening. Please help me

Regards,

Srikanth

5 REPLIES 5
Read only

Former Member
0 Likes
859

Hi,

Is form MOVE_FIEDL_TO_VBAP is getting called; while you are creating SO through your Z program?

If yes, you need to check why the exit logic is getting failed.

If no, you need to find some other location where you need to write the population logic for field VBAP-VKAUS.

Thanks,

Dharmishta

Read only

0 Likes
859

Hi,

My form is getting called when I call Zprogram... and I could see the vbap-vkaus is updated with the new value other that passed value...

-Srikanth

Read only

0 Likes
859

but after execution the order item value was the passed value but not the form passed value...

-Srikanth

Read only

Former Member
0 Likes
859

Hi Srikanth,

     May I see your code?

Cheers!

Charlie

Read only

0 Likes
859

data: lcl_order_line type REF TO ZCL_SD_ORDER_LINE.

IF vbap-uepos IS INITIAL.     "Skip for the sub items

***  Get Default End use from Soldto, if soldto is an exempt customer default-N/A

      CALL METHOD zcl_order_line=>get_usage_default

      receiving

      g_usage_default = vbap-vkaus.

  ENDIF.

this is in userexit

-Srikanth