Passing select-options table to a class method
Hi,
I have to pass a table which contains a select-options to a class method as a param...
How I do this??
DATA s_mail TYPE z_mail_rng.
o_mail->add_receiver( ? ).
(add_receiver's formal param is TYPE ANY)
Plese give me help.
Thanks.
Hi,
I send coding for how to use select-options in class.
May it is useful for u
tables:marc.
selection-screen begin of block b1 with frame title text-001.
select-options: s_matnr for marc-matnr.
selection-screen end of block b1.
class c3 definition.
public section.
types: begin of ty_marc,
matnr type marc-matnr,
werks type marc-werks,
end of ty_marc.
data: wa_itab type ty_marc.
data: itab type table of ty_marc .
data: wa_matnr type r_matnr.
methods: add.
private section.
*methods: sub.
endclass.
class c3 implementation.
method add .
select matnr
werks
from marc into table itab where matnr IN s_matnr.
write:/ 'material no', 20 'plant'.
loop at itab into wa_itab.
write:/ wa_itab-matnr,
wa_itab-werks.
endloop.
endmethod .
endclass.
start-of-selection.
data b1 type ref to c3.
create object b1 .
call method b1->add.
Similar Messages
-
Passing select-options values using call transaction method
Hi Experts,
I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
TYPES: BEGIN OF t_tab,
bukrs TYPE bukrs,
werks TYPE werks_d,
matkl TYPE matkl,
END OF t_tab.
DATA: w_tab TYPE t_tab,
i_tab TYPE STANDARD TABLE OF t_tab.
SELECT-OPTIONS: s_matnr FOR marc-matnr.
Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
Thanks a lot.
Regards,
KrishanHi Krishan,
For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
... OPTIONS FROM opt
*Effect*
This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
DISMODE
Processing mode (comparable with the MODE addition)
UPDMODE
Update mode (comparable with the UPDATE addition)
CATTMODE
CATT mode (controlling a CATT procedure)
The CATT mode can have the following values:
' ' No CATT procedure active
'N' CATT procedure without single screen control
'A' CATT procedure with single screen control
DEFSIZE
Use standard window size
RACOMMIT
COMMIT WORK does not end CATT procedure
NOBINPT
No batch input mode, that s SY-BINPT = SPACE.
NOBIEND
No batch input mode after BDC data has been read
The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
'X' Yes
' ' No
If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
DISMODE from the MODE addition
UPDMODE
from the UPDATE addition
CATTMODE
No CATT procedure active
DEFSIZE
Do not use standard window size
RACOMMIT
COMMIT WORK ends procedure successfully
NOBINPT
Batch input mode, that is SY-BINPT =X.
NOBIEND
Batch input mode also active after BDC data has been read
Regards,
Swapna. -
Problem in passing select-options to class meathods , type any table
<h1>how to pass type any table to class meathod</h1>
<h3>hi all
i'm trying to build class to validate the selection screen , like select-options and parameters
while writing meathod to validate the select-options
its throwing parameter mismath error</h3>
<h4>i tried like made import parameter in class meathod as 'TYPE ANY TABLE' and tried to pass select-options from my program it is saying type mismatch , how to overcome this problem </h4>
<h4>and i want to pass any select option , either of type lfa1-lifnr or mara-matnr or any other</h4>
Moderator message : Don't shout, use proper font size for explaining the question. This has been discussed in ABAP forums before. Search for available information. Thread locked.
Edited by: Vinod Kumar on Sep 14, 2011 11:20 AMhI
Triggering and Handling events
At the moment of implementation, a class defines its:
Instance events (using the EVENTS statement)
Static events (using the CLASS-EVENTS statement)
Classes or their instances that receive a message when an event is triggered at runtime and want to react to this event define event handler methods. Statement: METHODS
CLASS IC1_VEICHLE DEFINATION.
PUBLIC SECTION.
METHOD CONSTRUCTOR IMPORTING
EVENTS VEICHEL_CREATION.
ENDCLASS
CLASS LC1_VEICHLE IMPLIMENTATION.
METHOD CONSTRUCTOR
RAISE EVENT VEICHLE_CREATION.
REWARD IF USEFULL -
Passing select-options to method of class
Hai friends,
Could u please tell me how to pass select-options as parameters to method of a class.Hi
You have to declare the select
options like
<b>DATA: l_kunnr TYPE STANDARD TABLE OF wselkunnr,</b>
see this example
*& Report ZCL_TEST_ANJI
REPORT zcl_test_anji.
TABLES kna1.
DATA: l_kunnr TYPE STANDARD TABLE OF wselkunnr,
l_kna1 TYPE STANDARD TABLE OF kna1,
l_sales TYPE STANDARD TABLE OF vbak,
l_cust TYPE kna1,
l_vbak TYPE vbak.
DATA: obj_cust TYPE REF TO zcl_test_anji.
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr.
Start of Selection
START-OF-SELECTION.
CREATE OBJECT obj_cust.
SET HANDLER obj_cust->event_handler_1 FOR obj_cust.
SET HANDLER obj_cust->event_handler_2 FOR obj_cust.
l_kunnr[] = s_kunnr[].
CALL METHOD obj_cust->zcust
EXPORTING
s_cust = l_kunnr
RECEIVING
it_kna1 = l_kna1.
IF NOT l_kna1[] IS INITIAL.
LOOP AT l_kna1 INTO l_cust.
WRITE: / l_cust-kunnr, 12 l_cust-name1,
48 l_cust-ort01, 85 l_cust-land1,
95 l_cust-pstlz.
HIDE l_cust-kunnr.
ENDLOOP.
ENDIF.
At line Selection
AT LINE-SELECTION.
CASE sy-lsind.
WHEN 1.
CALL METHOD obj_cust->zso
EXPORTING
im_kunnr = l_cust-kunnr
RECEIVING
it_so = l_sales.
IF NOT l_sales[] IS INITIAL.
LOOP AT l_sales INTO l_vbak.
WRITE: / l_vbak-kunnr, 12 l_vbak-vbeln,
24 l_vbak-vkorg, 30 l_vbak-audat,
43 l_vbak-netwr.
ENDLOOP.
ENDIF.
ENDCASE.
<b>Reward points if useful</b>
Regards
Anji -
HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS
Hi experts,how to pass select options value as a export parameters to a zclass.
can give me some idea.
Thanks
saiAs Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
So - assuming you have the following in your program:
DATA: wa TYPE sflight.
SELECT-OPTIONS so_car FOR sflight-carrid.
you can create a publically-visible type in your class using direct type entry and the code
TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
and use this to define the importing parameter of the method.
The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
Hope this helps.
Regards
Jon. -
Passing Select-options to methods ?
Hi,
I want to create a method and pass a select-option to it. How to declare the parameter for this method.
regards,
Navneeth K.Hello Navneeth
Sorry for the delay (I could not reply in the morning).
However, here is a sample report showing how class <b>CL_DBSEL_CATS</b> can be used to select CATSDB data. The select-options are transferred via <b>sy-repid</b> to the class.
*& Report ZUS_SDN_ALV_CATSDB_SELECT
*& Screen '0100' contains no elements. ok_code -> assigned to GD_OKCODE
*& Flow logic of screen '0100':
*& PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*& PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
*& Description: Transfer select-options from selection screen into
*& method via sy-repid
REPORT zus_sdn_alv_catsdb_select.
TABLES: catsdb.
CONSTANTS:
gc_tabname TYPE tabname VALUE 'CATSDB_EXT'.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syrepid,
gd_rejected TYPE catsxt_reject_count,
gd_rejected_n(6) TYPE n,
gt_fcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
DATA:
go_cats TYPE REF TO cl_dbsel_cats.
DATA:
gt_outtab TYPE catsdb_ext_itab.
" NOTE: select-options MUST have the same names as defined in
" instance attribute SELCRIT (of class CL_DBSEL_CATS)
SELECT-OPTIONS:
ldbpernr FOR catsdb-pernr,
ldblgart FOR catsdb-lgart,
ldblstar FOR catsdb-lstar DEFAULT '1410' TO '1412'
SIGN i OPTION bt.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender. " grid instance that raised the event
PRIVATE SECTION.
CLASS-DATA:
ms_outtab LIKE LINE OF gt_outtab.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_col_id TYPE lvc_s_col.
READ TABLE gt_outtab INTO ms_outtab INDEX e_row-index.
CHECK ( syst-subrc = 0 ).
CASE e_column-fieldname.
WHEN 'PERNR'.
** SET PARAMETER ID 'KUN' FIELD ms_outtab-pernr.
** SET PARAMETER ID 'BUK' FIELD ms_outtab-bukrs.
** CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN OTHERS.
* do nothing
ENDCASE.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
gd_repid = syst-repid.
" Create instance for selecting CATSDB data
CREATE OBJECT go_cats
EXPORTING
im_calling_program = gd_repid " <= 'import' of select-options !!!
* IM_AUTHORITY_CHECK_TYPE = 'R'
* IM_FIELD_SELECTION =
* IM_SELECTION_CRITERIA =
* IM_FREE_SELECTIONS =
* IM_BADI =
" Select records from CATSDB -> uses select-options from current report
CALL METHOD go_cats->get_time_sheet_data
* EXPORTING
* IM_PERSONNEL_NUMBER_TAB =
IMPORTING
ex_cats_data = gt_outtab
* EX_CATSXT_DATA =
* EX_DOCFLOW =
gd_rejected = go_cats->get_reject_count( ).
IF ( gd_rejected > 0 ).
WRITE gd_rejected TO gd_rejected_n NO-ZERO.
CONDENSE gd_rejected_n NO-GAPS.
MESSAGE i398(00) WITH 'Rejected records =' gd_rejected_n ' ' ' '.
ENDIF.
DESCRIBE TABLE gt_outtab.
WRITE syst-tfill TO gd_rejected_n NO-ZERO.
CONDENSE gd_rejected_n NO-GAPS.
MESSAGE s398(00) WITH 'Selected records =' gd_rejected_n ' ' ' '.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid.
* Build fieldcatalog
PERFORM build_fieldcatalog.
PERFORM set_layout_and_variant.
* Display data
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog.
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = gc_tabname
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT_AND_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM set_layout_and_variant .
CLEAR: gs_layout,
gs_variant.
gs_layout-zebra = abap_true.
gs_layout-cwidth_opt = abap_true.
gs_variant-report = syst-repid.
gs_variant-handle = 'GRID'.
ENDFORM. " SET_LAYOUT_AND_VARIANT
Regards
Uwe -
Passing select-options value in method
How to pass select-options value in method ?
Example:
Select-options: carrid for spfli-carrid.
class cl_myclass implementation.
select carrid connid from
spfli where carrid in carrid.
endclass.
ThanksHello Anee
The coding of this functionality is quite simple:
REPORT zmy_report.
DATA: go_myclass TYPE REF TO zcl_myclass,
gd_repid TYPE syst-repid.
PARAMETERS:
p_bukrs ...
SELECT-OPTIONS:
o_kunnr ...
START-OF-SELECTION.
gd_repid = syst-repid.
CREATE OBJECT go_myclass
EXPORTING
id_calling_program = gd_repid.
And that's how your CONSTRUCTOR method should look like:
METHOD constructor. " IMPORTING parameter id_calling_program
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = id_calling_report
TABLES
SELECTION_TABLE = me->mt_selopts.
" NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
ENDMETHOD.
Finally you have to extract the parameter and select-options from MT_SELOPTS.
Regards
Uwe -
How to Pass Select-options Single values as Parameter value to Method ?
Hi Friends,
I need to pass select-options values(single values) for s_arbpl to the method "process_percent_planned". Now all single values are in internal table s_arbpl-low field. I need to pass this internal table(s_arbpl-low) values to the method where i will run query based on these single values.In my below code i am passing value through variable w_arbpl. I have defined this parameter in the method.But here only one value is passed to method. I want multiple single values (in s_arbpl-low) should be passed. Please let me know how to correct code.
Tables: crhd.
Data: ktext type auftext,
w_arbpl type arbpl.
select-options: s_arbpl for crhd-arbpl.
ktext = 'Test'
create object obj_plan.
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low.
Thankshi ,
when you want to pass S_ARBPL AS PARAMETER IN SELEC OPTION
ARBPL SUCH AS
WIN002
WIN003
WIN004
WIN005
WIN006
WIN007
IN MULTIPLE SELECTION S_ARBPL
THEN
USE
Tables: crhd.
Data: ktext type auftext,
w_arbpl type arbpl.
select-options: s_arbpl for crhd-arbpl.
ktext = 'Test'
LOOP AT S_ARBPL .
create object obj_plan.
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low.
ENDLOOP.
REGARDS
dEEPAK .
THEN SELECT THAT
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low. -
Passing Select-options as parameter to function module
I need to pass a select-option as a parameter to a function module. Is this possible?
There is an option of passing all the values of the select-option to an internal table, passing that internal table as parameter to the function module, and then adding it manually again to a select-option in the function module.
But is there any direct way to do this?Hi,
I have a similar problem: I have RFC function module to which I want to pass select options. Therefore I defined table parameters as follows:
IT_RUNID TYPE EFG_TAB_RANGES
IT_PERNR TYPE EFG_TAB_RANGES
IT_REINR TYPE EFG_TAB_RANGES
I can successfully pass my values to the module, but if I try to check these parameters
using
CHECK IT_TRIPS-RUNID IN IT_RUNID.
CHECK IT_TRIPS-PERNR IN IT_PERNR.
CHECK IT_TRIPS-REINR IN IT_REINR.
the check always fails, I guess because there are leading zeros in the ranges. Is there a way to solve this problem?
Thanks and regards,
Martin -
Passing Select option to smartform
Hi All,
Can any one please suggest how to pass values selected in select-options to smartform.
I am aware of the iuse of var-low and Var-high,
bt what if user inputs multiple values?
Also,is there any standard table type of table that is created when we use select-options.so that we can pass this table to smartform while using select options.
Regards,
SangvirBuild in smartform in form interface select option table
and pass the select option table from the program to the
smartform.
to build select option table in smartform you can built
type in global definition tab types.
Then, use it in form interface. -
How to pass select-option filed to Function Module Exporting Parameter
Hi,
How to pass select-option filed to Function Module Exporting Parameter.
ThanksHi,
DATA: BEGIN OF ITAB5_WRK OCCURS 0,
KUNNR TYPE KNKK-KUNNR, "CUSTOMER #
SBGRP TYPE KNKK-SBGRP, "CREDIT REP
KLIMK TYPE KNKK-KLIMK, "CREDIT LIMIT
NAME1 TYPE KNA1-NAME1, "CUSTOMER NAME
SKFOR TYPE KNKK-SKFOR, "TOTAL A/R
AMT1 TYPE KNKK-SKFOR, "CURRENT
AMT2 TYPE KNKK-SKFOR, "01-30
AMT3 TYPE KNKK-SKFOR, "31-60
AMT4 TYPE KNKK-SKFOR, "61-90
AMT5 TYPE KNKK-SKFOR, "91-120
AMT6 TYPE KNKK-SKFOR, "OVR 120
BZIRK TYPE KNVV-BZIRK,
END OF ITAB5_WRK.
SELECT-OPTIONS P_COMP FOR T001-BUKRS
SELECT KUNNR SBGRP FROM KNKK
INTO TABLE ITAB5_WRK
WHERE SBGRP IN P_REP
AND KUNNR GE '0001000000'
AND SKFOR NE 0.
LOOP AT ITAB5_WRK.
DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
ENDLOOP.
PERFORM GET_CREDIT_LIMITS.
*=======================================================================
IF P_DIST NE SPACE.
LOOP AT ITAB5_WRK.
SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
AND VKORG EQ P_COMP
AND VTWEG EQ '20'
AND SPART EQ '10'
AND BZIRK IN P_DIST.
IF SY-SUBRC EQ 0.
MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
MODIFY ITAB5_WRK.
ELSE.
DELETE ITAB5_WRK.
ENDIF.
ENDLOOP.
ENDIF.
*==============================================================
LOOP AT ITAB5_WRK.
MOVE: 'F/S' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
PERFORM AGING.
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MOVE: 'SPEC' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
*PERFORM AGING.*
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MODIFY ITAB5_WRK.
ENDLOOP.
FORM AGING.
*CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'*
EXPORTING
BUKRS = P_COMP
KKBER = WRK-KKBER
KUNNR = WRK-KUNNR
RASID = 'FEND'
KLIMP = 'X'
IMPORTING
SFAE1 = W_SFAE1
SFAE2 = W_SFAE2
SFAE3 = W_SFAE3
SFAE4 = W_SFAE4
SFAE5 = W_SFAE5
SFAE6 = W_SFAE6
SFAEL = W_SFAEL
SNFA1 = W_SNFA1
SNFA2 = W_SNFA2
SNFA3 = W_SNFA3
SNFA4 = W_SNFA4
SNFA5 = W_SNFA5
SNFA6 = W_SNFA6
SNFAE = W_SNFAE
EXCEPTIONS
NO-AGING_SCHEDULE = 1
NO_TABLE_INPUT = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
WHEN 2.
MESSAGE E999 WITH 'DO NOTHING ??'.
ENDCASE.
ENDFORM. "AGING
Thanks -
Passing SELECT-OPTIONS value to Function Module
Hi,
I need to pass select-options value to a function module.
Code is like the following:
SELECT-OPTIONS seltab FOR object-type.
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
However, that could not help me much in solving my problem.
So far I have tried to created a structure in DDIC with the following components for the select-options:
SIGN - BAPISIGN
OPTION - BAPIOPTION
LOW - ZBWOBJECTTYPE (my type)
HIGH - ZBWOBJECTTYPE (my type)
and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
Could anyone please help me on this issue?
Thanks in advance.
Regards,
Joon MengHello Joon,
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
You have defined SELTAB as a SELECT-OPTION.
So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
It is similar to the concept of an internal table with header line.
Hope i am clear.
Anyways how have you defined result_tab and sel_tab ?
BR,
Suhas -
Passing SELECT-OPTIONS to smart forms
hi ,
how can we pass select options from a program to a smart form.
Regards
ArunHi,
Just try to append the valid values in select options to internal table from report.
Then pass that internal table(ofcourse, you need to create user-defined struture if needed in SE11) from report to smart forms.
Rgds,
J.Jayanthi -
Showing error in passing select option to smartforms
Dear Friends,
I have done program of passing select option to smartforms. But it was showing errorin Types of Global defination that the flat structure is not allowed. So pls guide me.
Thanks in advance,
PradipkumarHi Pradip,
<li>When you want pass select-option from program to Smartform. You need create one structure in SE11 (data dictionary) and Use that under Form interface ->Tables tab
<li>The structure should have the following fields.
low
high
sign
option
<li>The structures should be same in the program and smartform when that is used as interface.
Thanks
Venkat.O -
Passing Select option to the sub routine
Hi All ,
how can we pass select option values to a subroutine ,
Thanks in Advance
VinayHi Vinay Kolla,
Check out this.
TYPES: TYP_DATUM TYPE RANGE OF SY-DATUM.
DATA: WA_DATUM TYPE LINE OF TYP_DATUM.
SELECT-OPTIONS : S_DATUM FOR SY-DATUM.
START-OF-SELECTION.
PERFORM WRITE_DATUM TABLES S_DATUM[].
*& Form write_datum
* text
* -->P_S_DATUM text
FORM WRITE_DATUM TABLES P_S_DATUM TYPE TYP_DATUM.
LOOP AT P_S_DATUM INTO WA_DATUM.
WRITE : /10 WA_DATUM-SIGN,
WA_DATUM-OPTION,
WA_DATUM-LOW,
WA_DATUM-HIGH.
ENDLOOP.
ENDFORM.
Regards,
R.Nagarajan.
We can -
Maybe you are looking for
-
It used to be that the other apartment with the same name didn't have theirs password protected so even though only one or the other would show up, I could always get onto one. Now, they have password protected theirs and it seems to be that 100% of
-
Can I set sidekick's Allowed Components for a parsys at the Template level?
The components page section on parsys[1] explains that you can set the sidekick's Allowed Components for a parsys by clicking Design Mode (ruler icon) in sidekick, then clicking Edit on the parsys and putting a checkmark on the components you want.
-
Camera Raw 5.7 doesn't work with MAC Elements 6
RAW 5.7 doesn't work on Elements 6. 5.6 works fine, placing the plugin in the /PLUG-INS/CS3/FILE FORMATS and starting Elements 6 and trying to open a raw file says Unable to use camera raw plugin It is not compatible with this version of Photoshop El
-
Does anybody know if JTextPane can run HTML pages containing Javascript code ? Thank you Nicolas
-
File download in Background mode
Hi All, A file need to be downloaded to the folder dc20\nt71data\jsox\" while execution in background mode. It is also mentioned that the file need not be sent to the application server. I am sure in background mode file couldn't be downloaded to the