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

Selection tables and parameter functions

Former Member
0 Likes
711

Hi,

What is the struture of the parameter my function need to expect for this peace of code work?

Do i have to create on structure of my one?

Program

SELECTION-SCREEN BEGIN OF BLOCK b1.

PARAMETERS CHARG TYPE MCHA-CHARG OBLIGATORY.

SELECT-OPTIONS TLoteCO FOR TQ30-ART.

SELECTION-SCREEN END OF BLOCK b1.

CALL FUNCTION 'ZIMPRIME_BA_MP'

EXPORTING

LOTEENTRADA = CHARG

TIPOLOTECONTROLO = TLoteCO.

Function

FUNCTION ZIMPRIME_BA_MP.

*"----


""Interface local:

*" IMPORTING

*" REFERENCE(LOTEENTRADA) TYPE CHARG_D

*" REFERENCE(TIPOLOTECONTROLO) TYPE ???????

Thanks

Hugo

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
682

Hello,

You need to create a range type.

Do the following go to SE11 and create a structure like follows:

SIGN TYPE C LENGTH 1

OPTION TYPE C LENGTH 2

LOW TYPE TQ30-ART (the domain or data element of this field)

HIGH TYPE TQ30-ART (the domain or data element of this field)

And then create a table type of this structure and then associate it with you parameter.

Regards.

5 REPLIES 5
Read only

Former Member
0 Likes
682

You can create the tabletype with a structure selec-options

option,sign,low,high

Read only

Former Member
0 Likes
683

Hello,

You need to create a range type.

Do the following go to SE11 and create a structure like follows:

SIGN TYPE C LENGTH 1

OPTION TYPE C LENGTH 2

LOW TYPE TQ30-ART (the domain or data element of this field)

HIGH TYPE TQ30-ART (the domain or data element of this field)

And then create a table type of this structure and then associate it with you parameter.

Regards.

Read only

Former Member
0 Likes
682

No need to create a structure ..

U can use structure .. RANGE_MATNR

Read only

Former Member
0 Likes
682

You can do this also..

with out mentioning the type, you pass the select options , then in the function module you create the range for

TQ30-ART.

then pass the values to the range and use...it in FM

Read only

Former Member
0 Likes
682

use the structures like range_matnr and range_werks..or use this....COMS_ATTR_RANGE