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

modifying table control column

Former Member
0 Likes
447

Hi all,

Can anybody please clear my doubt..Am new to module pool..

In table control am dispalying the material document number , purchase order and its details.My rquirements is in quantity column i can modify the quantities..After modifying it has to retain the value if i press enter..But its retaining..Can anybody suggest me how to write codings for that in module pool..

Regards,

Ramya.

3 REPLIES 3
Read only

Former Member
0 Likes
418

See the following Ex.

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'

LOOP AT G_TC1_ITAB.

CHAIN.

FIELD ZFG_SRNO-ZSRNO.

MODULE TC1_MODIFY ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

*&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!

*&SPWIZARD: MODIFY TABLE

MODULE TC1_MODIFY INPUT.

MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.

MODIFY G_TC1_ITAB

FROM G_TC1_WA

INDEX TC1-CURRENT_LINE.

ENDMODULE. "TC1_MODIFY INPUT

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
418

HI,

Check this link.Here I am explaining the database manipulations using table control.It can help you.Kindly reward points by clicking the star on the left fo reply,if it helps.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table%20c...

Read only

Former Member
0 Likes
418

Use this.

In your itab(table for table control display add another field along with other fields.


data: begin of itab occurs 0,
     sel type s-flag,
     matnr type matnr,
    belnr type belnr,
         "
         "
end of itab.

*In PAI...

 PROCESS AFTER INPUT.
  MODULE exit AT EXIT-COMMAND.

  LOOP AT itab.
    FIELD itab-sel     MODULE pick_sel.
  ENDLOOP.

*and in module pic-sel insert this lines.


IF itab-sel = 'X'.
*Modify the table with input  amount
    MODIFY itab INDEX tab_cntl-current_line TRANSPORTING amount-field                                                        

Regards.