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

syntax for subroutine

Former Member
0 Likes
616

I need to write a perform statement and then the corresponding form statement

ranges: r_vkorg for vbak-vkorg.

Perform create_range_vkorg using table i_vkorg changing r_vkorg

Where i_vkorg is an internal table that contains the sales org.

and r_vkorg is a range table

How to write the perform statement and the form statement.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
590

Hello,


TYPES:
  ty_vkorg TYPE STANDARD TABLE OF vbak-vkorg,
  ty_r_vkorg TYPE RANGE OF vbak-vkorg.

PERFORM create_range_vkorg USING i_vkorg[] CHANGING r_vkorg[].

FORM create_range_vkorg USING i_vkorg TYPE ty_vkorg CHANGING r_vkorg TYPE ty_r_vkorg.

Regards,

4 REPLIES 4
Read only

Former Member
0 Likes
591

Hello,


TYPES:
  ty_vkorg TYPE STANDARD TABLE OF vbak-vkorg,
  ty_r_vkorg TYPE RANGE OF vbak-vkorg.

PERFORM create_range_vkorg USING i_vkorg[] CHANGING r_vkorg[].

FORM create_range_vkorg USING i_vkorg TYPE ty_vkorg CHANGING r_vkorg TYPE ty_r_vkorg.

Regards,

Read only

Former Member
0 Likes
590

Hi

To write the perform statement and the corresponding form statement:

ranges: r_vkorg for vbak-vkorg.

Perform create_range_vkorg using table i_vkorg changing r_vkorg

double click on the subroutine name and then u can give the form statement as

Form create_range_vkorg using table <table_name> changing <name>

-


-


-


"the process that need to be done.

Endform

thanks & regards

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 25, 2008 5:05 PM

Read only

Former Member
0 Likes
590

Hi Megan,

First way nd the Easy way is

1. write PERFORM subroutinename

and double-click on the subroutine name.

2. Then choose the same program name.

and click enter.

3. Automatically the FORM...ENDFORM for the Subroutine will be created.

Regards,

Sunil

Read only

Former Member
0 Likes
590

hi,

u declare internal tables as types, and use those refarance type in form statement.

ex:

-


as per performace standards u write like this-------

types: begin of ty_vkorg,

type...

........

end of ty_vkorg,

ty_t_vkorg type standard table of ty_vkotg.

data: wa_vkorg type ty_vkorg,

it_vkorg type table of ty_vkorg.

perform create_range_vkorg using it_vkorg

changing r_vkorg.

form create_range_vkorg using p_it_vkorg type ty_t_vkorg

changing p_r_vkorg type standard table

<logic>

endform.

<REMOVED BY MODERATOR>

regards,

chandu.

Edited by: Alvaro Tejada Galindo on Apr 25, 2008 5:05 PM