on 07-02-2013 8:48 AM
Hi All,
REQUIREMENT: On PGI (VL02n) or on Reversing goods movement (VL09), when VBUK-WBSTK changes from A to C or C to A, output should be triggered. It should also trigger an IDoc for every PGI and Reversing.
MY CODE:
1) New routine created (VOFM -> Requirements -> Output Control, Application area = V2)
2) New Output Type created in NACE for V2 (Transmission Medium = EDI, Partner Function = LS)
3) Code within routine:
**-Fetch the existing Goods movement status
CLEAR lv_wbstk.
SELECT SINGLE wbstk "Total goods movement status
FROM vbuk "Sales Doc: Header Status and Admin Data
INTO lv_wbstk
WHERE vbeln EQ komkbv2-vbeln.
IF sy-subrc EQ 0.
**-Check with the current status
CASE lv_wbstk.
WHEN 'A'.
IF komkbv2-wbstk EQ 'C'.
sy-subrc = 0.
ENDIF.
WHEN 'C'.
IF komkbv2-wbstk EQ 'A'.
sy-subrc = 0.
ENDIF.
ENDCASE.
ENDIF.
DOUBTS:
1) Each time I do PGI, status should be updated in NAST table (VL02N -> Extra -> Delivery Output -> Header should be update with new line item). How to achive this?
2) How do I trigger IDocs from this routine?
Please help!
Thanks in advance.
Rgds
Solved it on my own...
"Multiple Issuing" was un-checked..working fine after checking it (NACE -> V2 -> Output Type -> Z*** ->General Data tab)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to define two output types,
one for PGI and another for Reversal
and assign respective routines in NACE transaction code
in output configuration, under the transmission medium you can maintain 6 to trigger IDOC
check and revert
thanks
santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.