Skip to Content
avatar image
Former Member

table control in module pool

Hi,

Iam using table control in module pool.

when i enter and save items, it should move into the internal table.

here i have header details and table control comes under item details where iam using 2 different tables one for header and another for item and the common field is the gatepass no. which iam generating dynamically by using FM (number_get_next) as soon as i save the record.

i have declared it like this.

loop at zmseg.----


>>(my internal table for items)

module user_command.----


> (here under save i have moved the data)

endloop.

OR

but iam facing problem when i item contains more than one item as it is generating gatepass no for every item. do i need to declare both seperately.

Under this i have declared: when 'save'.

moved all the data into header and item tables.

endcase.

Please let me know where iam doing mistake.

Regards,

Mahesh.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 14, 2009 at 12:41 PM

    Hi Mahesh,

    if you send the code we will try to give the solution..

    or if the question is clear we will get back to you.

    * generally in PAI
    
    PAI.
    
    module user_command 1000.
    
    module user_command 1000 input.
    
    move sy-ucomm to ok_code.
    case ok_code.
    
    when save.
    
    loop.    "items
    
    read header        "header data
    if sy-subrc = 0.
    "Move items to table and insert or append or update or save
    endif.
    
    endloop.
    
    
    endmodule.
    
    

    Regards,

    Prabhudas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 14, 2009 at 01:19 PM

    Hi,

    Would you pls. paste the code, so that its better to analyze the code and let you know where exactly is the mistake.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 18, 2009 at 03:10 PM

    loop the item table and modify it within the loop.

    Thanks for the support

    Add comment
    10|10000 characters needed characters exceeded