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: 

How to overwrite passed parameters to 'BAPI_CONTRACT_CREATEFROMDATA'

srikanth_d4
Participant
0 Kudos
157

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

Former Member
0 Kudos
103

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

0 Kudos
103

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

0 Kudos
103

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

-Srikanth

Former Member
0 Kudos
103

Hi Srikanth,

     May I see your code?

Cheers!

Charlie

0 Kudos
103

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