12-02-2009 5:04 PM
Hi,
I want to issue an output each time a particular field is changed in a delivery . I created a routine for that. However when I dont click the "Multiple issing " flag on in NACE it stops issuing o/p after the first change i.e it will issue an o/p after the first only. When that flag is ticked it issues an output even without change. How do i fix this problem???
12-02-2009 6:12 PM
Recheck whether the requirement routine is correctly implemented. (i.e. Sy-subrc value - You have to initiate sy-subrc = 4 before starting logic). Then verify that the requirement routine is attached to the 'Active' procedure.
This should work properly. Otherwise debug the requirement routine (through RSNAST00)
If the problem persists, revert back...
- Audy.
Edited by: Pikle Audumbar on Dec 2, 2009 7:12 PM
12-02-2009 8:58 PM
I have a few questions here :
1.To Issue mutlple output of the same o/p type in a particular document the option of "Multiple Issuing" in NACE is a must...Am I right or wrong..?
2. How should I debug this routine with the help of rsnast00 ? rsnast00 does not trigger an o/p type . It is triggered only when the document is saved.....
Kindly suggest a solution
12-03-2009 2:13 PM
My mistake sir.... RSNAST00 wont work for requirement routine.... Put a break-point in the routine and then execute the transaction and go-to the output control screen... While going to the output control screen, the control stops at the routine in debug mode..
And yes... "Multiple Issueing" should be checked to get the output each time you change the document.
Edited by: Pikle Audumbar on Dec 3, 2009 3:15 PM
12-03-2009 2:29 PM
Here is a sample code to check the changes...
This one is implemented to check whether Ship to party is changed in Sales Order (VA02) or not... If changed, then trigger output otherwise don't.
DATA: RET_CODE like SY_SUBRC,
IT_VBPA TYPE TABLE OF vbpavb WITH HEADER LINE, //Same as SAPMV45A
FS_FIELD(60) TYPE C.
FIELD_SYMBOLS: <FS_VBPA>.
RET_CODE = 4.
//Check whether ship-to party is changed.
// Logic: Get data from buffered YVBPA (Only changes are saved in YVBPA)
// So if, WE entry exists in YVBPA means Ship-To-Party is changed.
IF NOT RET_CODE IS INITIAL.
CLEAR FS_FIELD.
MOVE '(SAPMV45A)YVBPA[]' TO FS_FIELD. // Get data from buffer
ASSIGN (FS_FIELD) TO <FS_VBPA>.
IT_VBPA[] = <FS_VBPA>.
IF <FS_VBPA> IS ASSIGNED.
READ TABLE fs_vbpa TRANSPORTING NO FIELDS WITH KEY parvw = 'WE'.
IF sy-subrc = 0.
RET_CODE = 0.
ELSE.
RET_CODE = 4.
ENDIF.
ENDIF.
ENDIF.
SY-SUBRC = RET_CODE.
May be this is helpful..
12-03-2009 3:06 PM
Hi.
1. yes. tick the multiple issuing checked.
2. change the VOFM to set to sy-subrc = 4 if the field is not changes than what value is there already.
12-10-2009 5:17 PM
Thanks Soumya Prakash for the response !! Your suggestion helped resolve my issue . I may have to wait for a few more days to actually change the status of my question to answered as I have a few scenarios still to complete.
But,Thanks ....