2009 Nov 17 1:41 PM
HI EXPERT!,
I have requirement in said user exit . I have to check status for vbap-ktgrm (AAG account assignment group )for each line item.
how would I procedd? If possible plase help code
USEREXIT_SAVE_DOCUMENT_PREPARE
2009 Nov 17 2:07 PM
Hey,
Just right your validation inside the Subroutine. it will trigger for all the line items.
Main Program: SAPMV45A
Program: MV45AFZZ
Subroutine: USEREXIT_SAVE_DOCUMENT_PREPARE
Sample Code:
DATA: C_VA01(4) TYPE C VALUE 'VA01',
C_VA02(4) TYPE C VALUE 'VA02'.
IF SY-TCODE = C_VA01 OR SY-TCODE = C_VA02. "CREATE SALES ORDER
MOVE-CORRESPONDING ZSDSTRC_VBAK TO VBAK.
ENDIF.Note: This subroutine will trigger at the time of creation as well as change.
Using this you can validate your screen data and check the data before saving.
VBAK - Header
VBAP - Item
Regards,
Saravanan M.
HI EXPERT!,
I have requirement in said user exit . I have to check status for vbap-ktgrm (AAG account assignment group )for each line item.
how would I procedd? If possible plase help code
USEREXIT_SAVE_DOCUMENT_PREPARE
2009 Nov 17 1:49 PM
Hi
U need to loop the internal table XVBAP
Max
2009 Nov 17 2:07 PM
Hey,
Just right your validation inside the Subroutine. it will trigger for all the line items.
Main Program: SAPMV45A
Program: MV45AFZZ
Subroutine: USEREXIT_SAVE_DOCUMENT_PREPARE
Sample Code:
DATA: C_VA01(4) TYPE C VALUE 'VA01',
C_VA02(4) TYPE C VALUE 'VA02'.
IF SY-TCODE = C_VA01 OR SY-TCODE = C_VA02. "CREATE SALES ORDER
MOVE-CORRESPONDING ZSDSTRC_VBAK TO VBAK.
ENDIF.Note: This subroutine will trigger at the time of creation as well as change.
Using this you can validate your screen data and check the data before saving.
VBAK - Header
VBAP - Item
Regards,
Saravanan M.
2009 Nov 17 2:13 PM
Hi,
After checking status vbap-KTGRM i have to maintain incompletion log accordingly...I thing I have to see another table XVBUV for incompletion procedure (item category)
2009 Nov 17 2:23 PM
Hey,
Both XVBUV and VBUV were triggering in the same subroutine.
Regards,
Saravanan M
2009 Nov 17 2:43 PM
Hi Sarvanan M,
This is the actual requirement.
If AAG (ktgrm) is NE space (AAG field having some value),
It should not be displayed in the incompletion log.
Else,
It should be displayed in the incompletion log.
What I'm trying to do is,just deleting from Xvbuv field fehgr. I thing it will serve my purpose.?
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |