Application Development 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: 

how to creat 'perform and form' (details of problem)

Former Member
0 Kudos

hi all

i want to explain the exact problem.

i want to pass itab_deblo table records into t_blocked through 'perform and form'.

example.

perform authority_check tables itab_deblo

this i am writing in perform.

now i want to know what should i write in form so that t_blocked which is internal table (not type-pool) will get data from itab_deblo.

thanking u all for helping.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Raj,

You shall write

First of all the internal table shall be declared as global internal table. I mean it should be in the top include. Now, While declaring use this code :

Form authority_check

tables p_itab_deblo structure itab_deblo(declared as global table).

Endform.

This will definitely work...

Please reward appropriate points....

Lokesh

8 REPLIES 8

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Is itab_deblo and t_blocked have the same structure?

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please only post one post per question. You can add more to your original posts. Thanks.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Raj,

You shall write

First of all the internal table shall be declared as global internal table. I mean it should be in the top include. Now, While declaring use this code :

Form authority_check

tables p_itab_deblo structure itab_deblo(declared as global table).

Endform.

This will definitely work...

Please reward appropriate points....

Lokesh

0 Kudos

Sorry one correction,

Declare a type of the internal table globally and then use that type for reference.

eg.

declare the type globally.

Types : begin of ty_deblo

field1 type c,

field2 type c,

........

end of ty_deblo.

Form authority_check

tables p_itab_deblo structure TY_deblo(declared as global table).

Lokesh

0 Kudos

hi all

i could solve my prob with your help. i am really greatful to u all.

thanx.

0 Kudos

Hi Raj,

That is what the forum is for, helping each other. Can you please close your other posts regarding the same issue?

Thanks,

Srinivas

Former Member
0 Kudos

Hi Raj,

You can continue in the same post instead of opening three posts for the same issue.

Here is how you can do your code, assuming your t_blocked and itab_deblo are declared globally.


perform authority_check tables itab_deblo.

....

...

form authority_check tables itab_deblo structure <your structure>.

  loop at itab_deblo.
    move-corresponding itab_deblo to t_blocked.
    append t_blocked.
    clear t_blocked.
  endloop.
endform.

Regards,

Srinivas

Former Member
0 Kudos

Hi,

When u write the perform authority_check tables itab_deblo.

declare t_blocked as the same structure like that of itab_deblo.

data : t_blocked type standard table of itab_deblo with header line.

When u create this perform it creates a form...endform

form authority_check tables p_itab_deblo.

t_blocked[] = p_itab_deblo[].

......

......

endform.

U can use directly p_itab_deblo for ur addition data modifications or else move data and use the t_blocked for addition data modifications.

if u want only particular data fields to be moved then use

loop at p_itab_deblo.

t_blocked-<field1> = p_itab_deblo-<field1>.

t_blocked-<field2> = p_itab_deblo-<field2>.

t_blocked-<field5> = p_itab_deblo-<field5>.

......

......

append t_blocked.

clear : t_blocked, p_itab_deblo.

endloop.

If this helps U Pl. award points.