2016 May 12 2:14 AM
Hi Expert,
I want to populate the 'zvalue' in one of unused field in NAST table. This logic I did in FM 'RV_MESSAGE_UPDATE', then, it will call the zprint program, and 'zvalue' will be used in the print program. Unfortunately, it cause an error in update.
Below is example of my code:
DATA: LV_COUNT TYPE NAST-PMID1.
LV_COUNT = '2'.
UPDATE NAST
SET PMID1 = LV_COUNT
WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY.
IF SY-SUBRC = 0. --------->>> SY-SUBRC = 4.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
ENDIF.
My question are:
1)Can we modify NAST table? If can, how we can modify it?
2)Else, is there is any way so that i can pass the total number of invoices that has been generated in VF04 to the zprint program?
Please advice,
Thanks and regards.
Hi Expert,
I want to populate the 'zvalue' in one of unused field in NAST table. This logic I did in FM 'RV_MESSAGE_UPDATE', then, it will call the zprint program, and 'zvalue' will be used in the print program. Unfortunately, it cause an error in update.
Below is example of my code:
DATA: LV_COUNT TYPE NAST-PMID1.
LV_COUNT = '2'.
UPDATE NAST
SET PMID1 = LV_COUNT
WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY.
IF SY-SUBRC = 0. --------->>> SY-SUBRC = 4.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
ENDIF.
My question are:
1)Can we modify NAST table? If can, how we can modify it?
2)Else, is there is any way so that i can pass the total number of invoices that has been generated in VF04 to the zprint program?
Please advice,
Thanks and regards.
2016 May 12 5:00 AM
Hi ,
Did you try to update like sap did in RV_MESSAGE_UPDATE after population necessary fields into the internal table?
* array update
update nast from table lt_update.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |