We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-dev] Updating REGUP (ZLSPR -Payment Block) using Table control

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by Tausif
on Jun 9 at 10:59 AM
Hi All,

I am facing a problem in updating REGUP-ZLSPR (Payment Block) using Table control.

As per the requirement of the client we have created a module pool program were we display the list of documents in table control.
The data is fetched from REGUP table and displayed in table control, the field REGUP-ZLSPR is displayed as Check-box.

If the user checks the record We have to update that particular record with value in database (REGUP-ZLSPR) with value 'A' (blocked).

When I run the modify statement on save I get sy-subrc as 0, but the REGUP-ZLSPR is not updated with the values from internal table.

Below is the code:


CASE save_ok.

WHEN 'AUTH'.

CLEAR ls_regup2.
REFRESH: lt_regup2.

lt_regup2 = lt_regup.

LOOP AT lt_regup INTO ls_regup2.
IF ls_regup2-ZLSPR = 'X'.
ls_regup2-ZLSPR = 'A'.
MODIFY lt_regup FROM ls_regup2 TRANSPORTING ZLSPR.
ENDIF.
ENDLOOP.

MODIFY regup FROM TABLE lt_regup.
l_updated = sy-dbcnt.

MESSAGE i107(ZSCP_MSG) WITH l_updated.


Do we have any restriction for updating ZLSPR or is there any problem in the code.
Please suggest approach to solve the above issue.

Thanks in advance.

Regards,
Tausif

__.____._
Copyright © 2010 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language