Export some Field Value To While creating Sales Order
Exporting Some Value While Creating Sales Order
IF sy-uname = 'ROHINI'.
* BREAK chiragb.
DATA : lv_pltyp TYPE pltyp.
CLEAR : lv_pltyp.
SELECT SINGLE pltyp
FROM vbkd
INTO lv_pltyp
WHERE vbeln = vbak-vbeln.
IF lv_pltyp <> vbkd-pltyp.
xvbak-name_flg = 'X'.
* yvbak-name_flg = 'X'.
vbak-name_flg = 'X'.
* xvbak-augru = '000'.
* vbak-augru = '000'.
ENDIF.
ENDIF.
if sy-ucomm = 'HEAD'.
export xvbak-auart to MEMORY id 'SAUR'.
export xvbap-werks to MEMORY id 'SWER'.
endif.
*BREAK ROHINI.
*DATA : lv_kvgr2 TYPE kvgr2,
* flag_kvgr2 TYPE flag.
*IF sy-tcode = 'VA02'.
* SELECT SINGLE kvgr2 FROM vbak
* INTO lv_kvgr2
* WHERE vbeln = vbak-vbeln.
* IF vbak-kvgr2 <> lv_kvgr2.
* flag_kvgr2 = 'X'.
* EXPORT flag_kvgr2 FROM flag_kvgr2 TO MEMORY ID 'SY-UNAME'.
* ENDIF.
*ENDIF.
*
*
*DATA : lv_audat TYPE sy-DATUM,
* flg_audat TYPE flag.
*IF sy-tcode = 'VA02' and sy-UNAME = 'ROHINI'.
* SELECT SINGLE audat FROM vbak
* INTO lv_audat
* WHERE vbeln = vbak-vbeln.
* IF vbak-audat <> lv_audat.
* flg_audat = 'X'.
* EXPORT flg_audat FROM flg_audat TO MEMORY ID 'FLG_AUDAT'.
* ENDIF.
*ENDIF.
IF sy-uname = 'ROHINI'.
* BREAK chiragb.
DATA : lv_pltyp TYPE pltyp.
CLEAR : lv_pltyp.
SELECT SINGLE pltyp
FROM vbkd
INTO lv_pltyp
WHERE vbeln = vbak-vbeln.
IF lv_pltyp <> vbkd-pltyp.
xvbak-name_flg = 'X'.
* yvbak-name_flg = 'X'.
vbak-name_flg = 'X'.
* xvbak-augru = '000'.
* vbak-augru = '000'.
ENDIF.
ENDIF.
if sy-ucomm = 'HEAD'.
export xvbak-auart to MEMORY id 'SAUR'.
export xvbap-werks to MEMORY id 'SWER'.
endif.
*BREAK ROHINI.
*DATA : lv_kvgr2 TYPE kvgr2,
* flag_kvgr2 TYPE flag.
*IF sy-tcode = 'VA02'.
* SELECT SINGLE kvgr2 FROM vbak
* INTO lv_kvgr2
* WHERE vbeln = vbak-vbeln.
* IF vbak-kvgr2 <> lv_kvgr2.
* flag_kvgr2 = 'X'.
* EXPORT flag_kvgr2 FROM flag_kvgr2 TO MEMORY ID 'SY-UNAME'.
* ENDIF.
*ENDIF.
*
*
*DATA : lv_audat TYPE sy-DATUM,
* flg_audat TYPE flag.
*IF sy-tcode = 'VA02' and sy-UNAME = 'ROHINI'.
* SELECT SINGLE audat FROM vbak
* INTO lv_audat
* WHERE vbeln = vbak-vbeln.
* IF vbak-audat <> lv_audat.
* flg_audat = 'X'.
* EXPORT flg_audat FROM flg_audat TO MEMORY ID 'FLG_AUDAT'.
* ENDIF.
*ENDIF.
********************************ROHINI KUMAR*********************************
Please support my work : sap.rohini988@gmail.com
Comments
Post a Comment