‎2007 Apr 29 8:12 AM
hi all ,
in sale order transaction, i have to capure the values of the screen of the material number and item.no and do some manipulation before saving . ultimately i have to find an exit which works . thats also an issue . can anyone tell me the way to capture these values .
thnks in adance,
magesh
‎2007 Apr 29 8:16 AM
Hi!
If you have to capture and manipulate variants in the VA01 transaction, you have to use the program
MV45AFZZ
for this task.It is a standard SAP program, but it is a user-exit to this transaction. You have to register it in OSS for an SSCR code.
Regards
Tamá
‎2007 Apr 29 9:28 AM
hi,
i have the exit . in that how can i capture the values fom screen .this is my requirement , i need the procedure how to do that . thanks for ur reply
‎2007 Apr 29 9:33 AM
hi,
i have the exit . in that how can i capture the values fom screen .this is my requirement , i need the procedure how to do that . thanks for ur reply
regards,
magesh
‎2007 Apr 29 12:02 PM
‎2007 Apr 29 12:19 PM
See the following code. You will have and idea:
data: lv_tcode.
clear : lv_tcode.
lv_tcode = sy-tcode.
*subroutine Call
PERFORM CUST_MATERIAL_READ
using lv_tcode
vbak-auart
vbak-vkorg
vbak-vtweg
vbak-spart
vbap-oid_ship
vbap-matnr
changing US_vbapkom-vwpos.
CLEAR : lv_tcode.
FORM CUST_MATERIAL_READ
USING P_lv_tcode type sy-tcode
P_VBAK_AUART type auart
P_VBAK_VKORG type vkorg
P_VBAK_VTWEG type vtweg
P_VBAK_SPART type spart
P_VBAP_OID_SHIP type kunwe
P_VBAP_MATNR type matnr
CHANGING P_US_VBAPKOM_VWPOS type vwpos.
CHECK P_lv_tcode = 'VA01'.
data: lv_vwpos type vwpos.
SELECT SINGLE vwpos
FROM tab1
INTO lv_vwpos
WHERE vkorg EQ P_VBAK_VKORG
AND vtweg EQ P_VBAK_VTWEG
AND spart EQ P_VBAK_SPART
AND kunwe EQ P_VBAP_OID_SHIP
AND matnr EQ P_VBAP_MATNR.
IF sy-subrc EQ 0.
P_US_VBAPKOM_VWPOS = lv_vwpos.
CLEAR : lv_vwpos.
ELSE.
SELECT SINGLE vwpos
FROM tab1
INTO lv_vwpos
WHERE vkorg EQ P_VBAK_VKORG
AND vtweg EQ P_VBAK_VTWEG
AND spart EQ P_VBAK_SPART
AND kunwe EQ P_VBAP_OID_SHIP.
IF sy-subrc EQ 0.
P_US_VBAPKOM_VWPOS = lv_vwpos.
CLEAR : lv_vwpos.
ENDIF.
ENDIF.
ENDFORM. " GLOBAL_CUST_MATERIAL_READ