Skip to Content
author's profile photo Former Member
Former Member

Lines of a table control are more than one table control problem.

Hi All,

I'm writing a screen which includes a table control and below is my code:

PROCESS AFTER INPUT.
  LOOP AT gt_blds.
    CHAIN.
      FIELD gw_bld-ebeln.
      FIELD gw_bld-ebelp.
      FIELD gw_bld-quanty.
      MODULE get_item ON CHAIN-INPUT.
    ENDCHAIN.
endloop.

The get_item was used to summary the total quanty of each PO item.

The problem is that once the lines of gt_blds is 16 and my table control lines is 14, the get_item module will only calculate from line 1 to line14, the last 2 lines was lost...

Can anyone help me?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 17, 2008 at 04:24 PM

    If you want to calculate the total every time for each line, just drop the 'ON CHAIN INPUT' and just do 'MODULE get_item.' I guess the on chain input event is not triggered for lines that are not currently displayed in the table control.

    But executing the module every time should do the trick.

    Hope that helps,

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Michael,

      The problem is whether I dropped the on chain-input statement. The program only loops the lines of the screen but not the whole internal table which i used to store all the data.

  • Posted on Dec 18, 2008 at 04:38 AM

    Hi,

    PROCESS AFTER INPUT.

    LOOP AT gt_blds.

    CHAIN.

    FIELD gw_bld-ebeln.

    FIELD gw_bld-ebelp.

    FIELD gw_bld-quanty.

    MODULE get_item ON CHAIN-INPUT.

    ENDCHAIN.

    **add one more module.

    module modify_tabcontrol

    endloop.

    in program.

    module modify_tabcontrol.

    describe table itab lines tc-lines.

    if tc-current_line > tc-lines.

    append itab.

    else.

    modify itab index tc-current_line.

    endmodule.

    even you cannot acheive this.

    add one more module after the loop statement

    module count_qty.

    in program

    module count_qty.

    *here you sum up or whatever you want

    endmodule.

    Regards

    Ramchander Rao.K

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.