Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
* * bro , if you are using table before inyernal table , then where conditio is not req , but the other case if you are not using table addition then where is mandatory, read the document which i am sending it to below. MODIFY <itab> FROM <wa> TRANSPORTING <f1> <f 2> ... WHERE <cond>. This processes all of the lines that meet the logical condition<http://help.sap.com/saphelp_wp/helpdata/en/fc/eb34 fc358411d1829f0000e829fbfe/content.htm><cond>. The logical condition can consist of more than one comparison. In each comparison, the first operand must be a component of the line structure. If the table lines are not structured, the first operand can also be the expression TABLE LINE. The comparison then applies to the entire line. The work area <wa>, which must be compatible with the line type of the internal table, contains the new contents, which will be assigned to the relevant table line using the TRANSPORTING addition. Unlike the above MODIFY statement, the TRANSPORTING addition is not optional here. Furthermore, you can only modify the key fields of the internal table if it is a standard table. If at least one line is changed, the system sets SY-SUBRC to 0, otherwise to 4. On 6/10/10, sarat attada email@removed wrote: > > IF ls_regup2-ZLSPR = 'X'. > ls_regup2-ZLSPR = 'A'. > MODIFY *table * 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. > > > > tausif check it , you have to use table in fornt of internal table in > modify statement apart from that you can also use a where condition in > modify statement if required > > > > On 6/9/10, Tausif via sap-dev <sap-dev@groups.ittoolbox.com> wrote: >> >> 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 | | _.____.__ |