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

Userexit/Function after sales order save

Former Member
0 Likes
5,097

Hi,

I want to get sales order and line item number, which I want to pass to function module immediately while sales order creation.

To get sales order and line item number after sales order save in VA01 is there any userexit or function?

I tried with userexit_save_document and userexit_save_document_prepare, but it did not solved my purpose.

Please reply.

Thanks

Hi,

I want to get sales order and line item number, which I want to pass to function module immediately while sales order creation.

To get sales order and line item number after sales order save in VA01 is there any userexit or function?

I tried with userexit_save_document and userexit_save_document_prepare, but it did not solved my purpose.

Please reply.

Thanks

6 REPLIES 6
Read only

Former Member
0 Likes
1,632

Hi,

Just try this uerexits.

V60F0001 SD Billing plan (customer enhancement) diff. to billing plan

V46H0001 SD Customer functions for resource-related billing

V45W0001 SD Service Management: Forward Contract Data to Item

V45S0004 Effectivity type in sales order

V45S0003 MRP-relevance for incomplete configuration

V45S0001 Update sales document from configuration

V45P0001 SD customer function for cross-company code sales

V45L0001 SD component supplier processing (customer enhancements)

V45E0002 Data transfer in procurement elements (PRreq., assembly)

V45E0001 Update the purchase order from the sales order

V45A0004 Copy packing proposal

V45A0003 Collector for customer function modulpool MV45A

V45A0002 Predefine sold-to party in sales document

V45A0001 Determine alternative materials for product selection

SDTRM001 Reschedule schedule lines without a new ATP check

Regards

Srinu

Read only

Former Member
0 Likes
1,632

>INCLUDE MV45AOZZ. " User-modules PBO

> INCLUDE MV45AIZZ. " User-modules PAI

and try these two exits

EXIT_SAPMV45A_003

EXIT_SAPMV45A_004

Edited by: Soumyaprakash Mishra on Oct 7, 2009 11:34 AM

Read only

0 Likes
1,632

Hi prakesh,

I didnt get you..could you please elaborate?

Read only

0 Likes
1,632

Hi,

Go to CMOD.

Create a project.

In the Enhancement tab, put V45A0003 as an entry in the change mode.

You will get two function exits in the components tab for this enhancement.

EXIT_SAPMV45A_003

EXIT_SAPMV45A_004

EXIT_SAPMV45A_003 will get trigger on save of VA01. Implement this exit. In include ZXVVAU05, code for your requirement. The exporting parameter XVBAK will contain the header information and table XVBAP will contain the item level information.

Hope it will help.

Regards

Natasha Garg

Read only

Former Member
0 Likes
1,632

Hi,

Apologies for the delayed reply - I've only just come across your post whilst looking for something else in the forums.

Although there is no sales order number available in the USEREXIT_SAVE_DOCUMENT_PREPARE (it is called before the number is generated). you should definitely have the sales order number available in the later userexit USEREXIT_SAVE_DOCUMENT - in field VBAK-VBELN.

I have done something pretty similar in the past, where I need to update some bespoke Z tables with the SD doc header, item + schedule line information. All of this is passed to a new function which is called in the VA01 update task.

e.g.

FORM USEREXIT_SAVE_DOCUMENT.
  CALL FUNCTION 'ZMY_FUNCTION'         
    in UPDATE TASK                                    
    EXPORTING                                           
      id_vbeln       = vbak-vbeln
      is_vbak        = vbak                          
      it_xvbap       = xvbap[]                      
      it_xvbep       = xvbep[].                                       
ENDFORM.

Hope this helps.

Ali

Read only

0 Likes
1,632

Hi ,

Could you please let me know what you have written inside your FM which called in update task.

I have same kind of requirement where i need to update soem custom fields of vbak tables. Here is the details given below .

CALL FUNCTION '/LGC/SDFGWW_VBAK_UPDATE' in update task

  EXPORTING

    i_vbak          = vbak

    i_sdtv45a       =
sdtv45a (Local structure which value i want to update in vbak)



    i_vbeln         = vbak-vbeln.

Code inside the FM .

  i_vbak-/lgc/banknum  = I_SDTV45A-zcheqbsbno.

  i_vbak-/lgc/bankaccnum = I_SDTV45A-bankn.

  i_vbak-/lgc/cheqnum = I_SDTV45A-zcheqno.

  i_vbak-/lgc/cheqname = I_SDTV45A-zcheqna.

Please have a look into it and let me know where i am doing wrong.

Thanks,

Satya

Message was edited by: satya pujahari