Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update value to NAST table return false

Former Member
0 Likes
1,116

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.

1 REPLY 1
Read only

Former Member
0 Likes
809

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.