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: 

BADI/BAPI or other application for update VBRK with append structure?

gilberto_parga
Participant
0 Kudos

I will insert an append structure to VBRK with only a field (a vbeln-type field). Ok, actually I have made modifications to SAPMV45A on the user exit MV45AOZZ for get the contract number from the order written on VA03 transaction and show it on a screen belongs that. Just I've gotten the contract number from the order number, and I wish to put it on VBRK (in the apppend structure field), considering that VBRK-VBELN is the 'WHERE' condition for what row is the correct for place their contract number (it is, assign the contract number, on VBRK, for the order number that user writes on VA03).

Is it a good idea to write an UPDATE sentence, inside the user exit, for doing the above? Can you tell me what BADI / BAPI can help me, rather than the UPDATE sentence?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Perga ,

do u want to Update VBRK from Sales Order Screen ?, i dont get it ? y u want to do it ? , first thing , u cannt use UPDATE keyword in those user exits.

let us know what exactly ur requirement is ? , at what point time u want to update ?

regards

Prabhu

5 REPLIES 5

abhishek_shukla3
Explorer
0 Kudos

Use exit EXIT_SAPLMCS6_001

gilberto_parga
Participant
0 Kudos

EXIT_SAPLMCS6_001 belongs to VF01 transaction, inside SAPMV60A. But I wish an application for VA03, may be in SAPMV45A. Is it right to write UPDATE VBRK sentence inside the MV45AOZZ Include, on SAPMV45A Module Pool (the application behind VA03)? I think it is a good option, quick and right. What do you think? I know is better to use a BAPI or a BADI for this job... But I don't know which one can help me.

Former Member
0 Kudos

Hello Perga ,

do u want to Update VBRK from Sales Order Screen ?, i dont get it ? y u want to do it ? , first thing , u cannt use UPDATE keyword in those user exits.

let us know what exactly ur requirement is ? , at what point time u want to update ?

regards

Prabhu

gilberto_parga
Participant
0 Kudos

Here the full history: I modified the VA03 transaction, by user exit. When you call VA03 transaction, Initial screen of Display Sales Order appears. You write a valid order in the Order textbox and then execute it. The "Display Standard Order: XXXX: Overview" screen shows. From here, you can push the "Display doc. header details" button. When you do it, the "Display Standard Order XXX: Header Data" screen appears. You can click on "Additional Data A" Tab. In the space below of "Additional Data for Pricing" Frame/Block, you can add your own fields by user-exit. You must know that it is the 4309 screen, and it belongs from SAPMV45A program. Inside the SAPMV45A program, there is the user exit I used for modify the 4309 screen (remember, this on VA03). I went to SE38 transaction (ABAP Editor) and I found SAPMV45A is a Mod. Pool, with the sentence INCLUDE MV45AOZZ (User-modules PBO). Ok, in MV45AOZZ I programmed SELECTs to find the contract number (sales order's preceding document) using VBFA and VBAK tables. I assigned the contract number to VBAK-ZLRREPAIR, to show it by the fields providen by user-exit. To show the contract number according the sales order is a fullfilled request of my customer. But the trouble is now to put the contract number (assigned to VBAK-ZLRREPAIR) to according sales order on VBRK table... And yes, on selects I used sales tables, meanwhile I will put contract number on VBRK, a Billing table (it is that customer wants), trough . Why I can't use UPDATE VBRK sentence, on MV45AOZZ include? What is the problem? Sorry, I do not have tried it yet :P... if you think there is a better method for putting the appended contract number field on VBRK from SAPMV45A tell me it please!

gilberto_parga
Participant
0 Kudos

Dear all:

I already finished this issue. The answer is: If you add an append structure to a standard table (VBRK, in this case), you can modify a field of this append structure inside an user exit include in a "normal" way (VBRK-ZCONTRACT = '99999', for example). The main program SAPMV45A is taking care of the update, without the 'UPDATE' instruction code from the programmer.

Edited by: Gilberto Parga on Apr 10, 2009 11:22 PM