‎2011 Jan 31 11:57 AM
Hi Guys,
Have a situation as follows:
Have to pass both the "select-options" and "PARAMETERS" to a function Module.
The "Select-options" and "Parameter" are "so_msg" and "p_dir" as described below.
SELECTION-SCREEN BEGIN OF BLOCK IdocFilter WITH FRAME TITLE text-001.
select-options: so_msg for EDIDC-MESTYP.
PARAMETERS: p_dir type EDIDC-DIRECT.
SELECTION-SCREEN END OF BLOCK IdocFilter.The Function module to which I have to pass these things Looks as follows:
How to pass the select-option and parameter to the following Function Module?
FUNCTION zsd_find_error_idocs.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" OUTTAB STRUCTURE ZCIDOC_OUT
*" INTAB STRUCTURE ZCIDOC_IN
*"----------------------------------------------------------------------Iam calling this function as follows:
CALL FUNCTION 'ZSD_FIND_ERROR_IDOCS'
DESTINATION space
TABLES
outtab = z_outtab_orders_12
intab = z_intab
EXCEPTIONS
not_found = 1
OTHERS = 2.Thanks
K
‎2011 Jan 31 12:48 PM
EFG_RANGES allows only select options , what about parameter then ?.
RSPARAMS can be used for both.
‎2011 Jan 31 12:13 PM
‎2011 Jan 31 12:32 PM
It Compiles,but gives me an Dump on running.
The Error analysis says that Iam passing the right type but not the right length.
select-options: so_msg for EDIDC-MESTYP.
FUNCTION zsd_find_error_idocs.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(DIRECTION) LIKE EDIDC-DIRECT
*" TABLES
*" OUTTAB STRUCTURE ZCIDOC_OUT
*" INTAB STRUCTURE ZCIDOC_IN
*" IDOC_TYPE STRUCTURE EFG_RANGES
CALL FUNCTION 'ZSD_FIND_ERROR_IDOCS'
DESTINATION space
EXPORTING
direction = p_dir
TABLES
outtab = z_outtab_orders_12
intab = z_intab
idoc_type = so_msg[]
EXCEPTIONS
not_found = 1
OTHERS = 2.Edited by: Kohinoor72 on Jan 31, 2011 1:32 PM
‎2011 Jan 31 12:41 PM
In your program before calling the function call RS_REFRESH_FROM_SELECTOPTIONS. This will hold all your selection screen values. Now create a parameter of type RSPARAMS_TT in your custom fm. Then pass the parameter SELECTION_TABLE of the function RS_REFRESH_FROM_SELECTOPTIONS to your custom fm. Later in your fm you can loop at it and use it. The select option and parameters will be differentiated in it using P and S.
‎2011 Jan 31 12:45 PM
But I want to pass it directly using the "EFG_RANGES" parameter.
The Dump says that so_msg has the right typee but not the right length.How to correct this...
‎2011 Jan 31 12:48 PM
EFG_RANGES allows only select options , what about parameter then ?.
RSPARAMS can be used for both.
‎2011 Jan 31 12:50 PM
‎2011 Jan 31 12:53 PM
Dear,
The error you are getting is very basic . Please have close look into it .
‎2011 Jan 31 1:08 PM
‎2011 Jan 31 1:40 PM
Hi,
Check out this [LINK|http://abap.googlar.eu/viewtopic.php?f=5&t=28]
hope it helps..
EDIDC-MESTYP - lenght char 30
EFG_RANGES-LOW - lenght char 45..
‎2011 Jan 31 2:13 PM
No Sucesss with "EFG_RANGES".
It gives me still the dump saying field length incorrect.
Want to Use "EFG_RANGES" beacuse in my Function Module,I want to check
something as follows using the "IN" keyword.
SELECT * FROM edidc CLIENT SPECIFIED INTO CORRESPONDING FIELDS
OF table outtab WHERE mandt = '020'
and CREDAT = z_datum
AND mestyp in so_msg
‎2011 Jan 31 3:13 PM
check out the following structure EDM_MESTYP_RANGE and see if you can use that instead of EFG_RANGES
‎2011 Jan 31 3:28 PM
Hi Kohinoor,
define the it as IMPORTING parameter TYPE STANDARD TABLE.
The you can use it with IN.
Regards,
Clemens
‎2011 Jan 31 3:34 PM