Application Development 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: 

after update, output issue

Former Member
0 Kudos

hi

following is the code.

.....

.....

.....

APPEND wa_pricing.

UPDATE zgps_pri FROM TABLE wa_pri.

IF sy-subrc = 0.

WRITE:/

wa_pri-part_nbr,

wa_pri-mfgng_duns_nbr,

wa_pri-srno,

wa_pri-rec_type,

text-003.

ELSE.

WRITE:/ text-004.

ENDIF.

endloop.

the above code is working and updating the table but not displaying output, it remains at selection screen only.

please help.

rocky

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

under which event you are doing this update.

Ideally it should be under start-of-selection or end-of-selection event.

show the code where you have written that event.

5 REPLIES 5

former_member188685
Active Contributor
0 Kudos

under which event you are doing this update.

Ideally it should be under start-of-selection or end-of-selection event.

show the code where you have written that event.

Former Member
0 Kudos

Hi,

Check if there is any value in waork area wa_pri.

if there is any value then check with the events.

your append and update should be inside start-of-selection and end-of-selection.

and one more thing, try to run your program with debugger on.

it will surely resolve your problem.

Thanks

Rajesh Kumar

Former Member
0 Kudos

Hi

Good

I dont think your if statement is working before the write statement and that would be the reason none of the write statement is giving the desired output.

Pls check the if statement in debug mode.

Thanks

mrutyun^

Former Member
0 Kudos

Hi,

You have to be clear that whether you are changing one record at a time or you are updating whole table to ztable.

If you are changing one by one then use the following code.

check wa is not initial.

modify ztable from wa.

clear wa.

Check for sy-subrc after that.

If you are updating internal table as a whole, use the following code.

Check itab is not initial.

modify ztable from table itab.

check for sy-subrc.

Former Member
0 Kudos

Hi,

"the above code is working and updating the table but not displaying output, it remains at selection screen only."

It means your update statement is not working properly and there is no data in wa_pri.

If there was a data in wa_pri then sy-subrc would have been 0 but that means sy-subrc = 4 so plz check the code in debug mode.

even check in which part of event u have written the code to display it should be either start-of-selection or end-of-selection.

Even check whether you are dealing with 1 record or number of records.

If you are changing one by one then use the following code.

use workarea for this and update or modify using tis workarea..

modify ztable from wa.

then clear wa and check sy-subrc also then commit if sy-subrc is 0.

If you are updating internal table as a whole, use the following code.

first of all check that internal table you are using is not initial .

modify ztable from table itab.

then check sy-subrc, then commit work.

thanx.

Edited by: Dhanashri Pawar on Sep 11, 2008 6:51 AM