Loop in select options
Hi,
In DEV in debugging mode, S_VENDO is showing three entries but
in PRD in debugging mode it shows one table entry.
and thats why looping in not happening in PRD properly.
I am inserting three entries.
So how to loop in select option field.
Edited by: Anurodh Jindal on Jun 5, 2008 1:32 PM
Hi Bala,
Please let us know why you need to loop in the range table as you can directly use it in your query or condition. Still if you want to loop, you will have to check the low as well as high values, and then adjust the loop accordingly. For ex.
LOOP AT s-vendo INTO ls_vendo.
lv_vendo = s_vendo-low.
IF s_vendo-high IS NOT INITIAL.
WHILE lv_vendo <= s-vendo-high.
"write your code here using lv_vendo
lv_vendo = lv_vendo + 1.
ENDWHILE.
ELSE.
"write your code here using lv_vendo
ENDIF.
ENDLOOP.
Let me know if you have any further doubts.
Regards,
Rachna
Similar Messages
-
How to use a select option parameter?
hi
i have created a selection screen in this way
select-option car_no for equi-equnr.
now i want to move all the values that i have selected in car_no range into an itab?
i used the debugger and so that i have low and high i can i move all the values into an itab
thanks.Hi,
If you want to move the values of your select-options into an internal table, LOOP the select options and move the values into your internal table.
sample code:-
select-options car_no for equi-equnr.
loop at car_no.
wa_itab-equnr = car_no-low.
append wa_itab to itab.
endloop.
But here you have to take care of few things.
Firstly the values which are excluded. There are 4 fields in selection options - Option, sign, Low and High. When sign is 'I' you can move it into your internal table. When it is 'E' you should not select that particular entry.
Secondly, do you have any high values. If there are high values available then you have to take all the values beteween low and high an move them into your internal table. One thing can be done in this case - while declaring the select option you can add "NO INTERVALS " so there would be only low value available unless user goes into EXTENSION option and selects ranges option.
If you wante to move them into ranges internal table, then you can declare ranges and move it into that table.
smaple code:-
DATA: r_equnr TYPE RANGE OF equi-equnr,
wa_r_equnr LIKE LINE OF r_equnr.
r_equnr[] = car_no[]
Can you give more clarification about your requirement, so that a better solution can be provided.
Edited by: Krishna Adabala on Nov 27, 2008 9:50 AM -
Hi All,
I am facing a problem in splitting the Select options for my screen. What I have to do is I am expecting the User to enter around 5000 records in the Select Options. I have to use 2000 records at a time for processing, which means three set of records of 2000, 2000 and 500.
Can you please tell me how can this be achieved??Are you sure that even reducing the SELECT-OPTION to package of 2000 will be enough, in some database the system will raise an error related to a too large SQL statement.
Splitting an internal table (as SELECT-OPTIONS are) is very easy. (see bellow)
But be aware that some records may be exclusions, like :
- SIGN = 'E' and OPTION is one of the positive operator like EQ, BT or CP
- SIGN = 'I' and OPTION is one of the negative operator (every operator except the three previous)
Those records must be in every package of selection
so loop at select-options
- put the exclusion in a first internal table
loop once again at select-options excluding the records of the previous loop
- append to a temporary internal table
- when number of record equal maximal number allowed for a SQL SELECT minus the number of record in the first internal table, execute the SELECT, clear the temporary internal table
To bypass this problem
- don't use those record to build the partial select-options but delete records after select from database
- You could(should) consider restricting select-options allowed options ([SELECT_OPTIONS_RESTRICT|http://wiki.sdn.sap.com/wiki/display/Snippets/RestrictSelectOptions]) so you wont have to execute this and only have to split an internal table with statement like [APPEND|http://help.sap.com/abapdocu_70/en/ABAPAPPEND.htm] [LINES OF jtab [FROM idx1] [TO idx2] |http://help.sap.com/abapdocu_70/en/ABAPAPPEND_LINESPEC.htm#&ABAP_ALTERNATIVE_3@3@]
Regards,
Raymond -
Hi all,
I need to pass select-option field value to a function module and get the output for each value present in selection screen.
selection options can contain for more the one value,i need to pass those all one bye one to the function module.
Please suggest on that.
Thanks
MohitHi,
What Function Module are you calling ?
You can loop at select option like:
loop at s_variable.
*--here you have values form s_variable-low and s_variable-high
*--call FM here
endloop.
Thanks & Regards,
Navneeth K. -
Validating select-options entries
hi
i need to check whether all entries in SELECT-OPTIONS range are valid or not.
*my select-options field is s-pernr as below.
SELECT-OPTIONS: s_pernr FOR pernr-pernr.
*all valid entries from PA0000 table will be selected into pernr_table.
SELECT DISTINCT pernr
FROM pa0000
INTO TABLE pernr_table
WHERE pernr IN s_pernr.
now i have to check all invalid pernr's in s_pernr.
s_pernr contains: 1, 5, 6, 7, 8, 9, 10.
PA0000 contains: 1, 2, 5, 8, 10, 11, 13, 15...
then pernr_table = 1, 5, 8, 10 only.
that means pernr 6, 7, 9 in s_pernr were invalid.
How to fetch these values as s_pernr is SELECT-OPTIONS field and it may have any combination of values.Hi,
As far as what i get from your question is, user put multiple values in the LOW field of the select-option and you have to
check all the values entered in the select-option-LOW field.
If this is the case, you can loop at select-option as show :-
1) create an internal table of type
BEGIN OF ty_pernr ,
sign(1) TYPE c,
option(2) TYPE c,
low TYPE pa0000-pernr,
high TYPE pa0000-pernr,
END OF ty_pernr.
2) create workarea of type ty_pernr.
data wa_pernr type ty_pernr.
3) loop at the select-option.
loop at s_pernr into wa_pernr.
SELECT single pernr
FROM pa0000
INTO TABLE pernr_table
WHERE pernr eq wa_pernr-low.
if sy-subrc ne 0.
"give error message.
endif.
endloop.
Hope this solves ur problem.
Regards,
Bhavesh. -
Select options and loop statement
Dear forum,
I have the scenario where i need to restrict the loop from the select-options.
in the select-options, user enter currency.
then in the loop i need to loop base on the currency user enter.
may i know what steps should i use for the loop as loop cannot support where.
thanksHI Gengis
I have the scenario where i need to restrict the loop from the select-options.
in the select-options, user enter currency.
then in the loop i need to loop base on the currency user enter.
may i know what steps should i use for the loop as loop cannot support where.
as per your requirement.
you have some data in your internal table also you have a select-options to input values.
on the basis of the values in your select option you want to fetch the values from your internal table. right???
then there should be a field like your select option in your internal table.
select-option: s_matnr for mara-matnr.
let assume you have an internal table with matnr and other fields also and your select-options is for mara-matnr.
then you need to select the values in your internal table according to the values in your select-options like below.
SELECT MATNR field1 field2........ from dbtable into table itab where matnr = s_matnr.
the above code will give you the values matching the values in your select-options.
you need not to apply loop becasue you already have only those values for which yo u have found records in the DBTABLE.
in case you want to apply loop on an internal table on the basis of s_matnr's values, then you can write.
in this scenario you need to define 2 internal table one with already fethced values and another in which we will fetch the values according to select-options.
loop at itab into wa_itab.
read table itab1 into wa_itab1 where matnr = wa_itab-matnr.
write statement........
endloop.
before that youwill have to fetch values in itab according to s_matnr.
I hope this will clear your query.
Thanks
Lalit Gupta. -
i have 5 select options on the screen. i want to take each select option .e.g one to one correpondence... I have to use a select query looping on the select option and send mails depending on the select query. also i have to concatenate the select option values in a variable
hi
hope it will help you.
Pls reward if help.
SELECT-OPTIONS: BEDAT FOR EKKO-BEDAT.
SELECT-OPTIONS: EBELN FOR EKKO-EBELN.
SELECT-OPTIONS: MATNR FOR EKPO-MATNR.
SELECT-OPTIONS: EREKZ FOR EKPO-EREKZ.
SELECT-OPTIONS: KOSTL FOR EKKN-KOSTL.
SELECT-OPTIONS: AUFNR FOR EKKN-AUFNR
DATA: INT LIKE ZSIMM_PO_HISTORY OCCURS 0 WITH HEADER LINE.
DATA: LW_EKKO TYPE EKKO,
LW_EKPO TYPE EKPO,
LW_EKKN TYPE EKKN,
LW_LFA1 TYPE LFA1.
SELECT * FROM EKKO INTO LW_EKKO
WHERE ( EBELN IN EBELN ) AND
( BEDAT IN BEDAT ).
CLEAR: INT.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING LW_EKKO TO INT.
ENDIF.
SELECT * FROM EKPO INTO LW_EKPO
WHERE ( EBELN = LW_EKKO-EBELN ) AND
( MATNR IN MATNR ) AND
( EREKZ IN EREKZ ).
CLEAR: INT.
MOVE-CORRESPONDING LW_EKKO TO INT.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING LW_EKPO TO INT.
ENDIF.
*SELEKCIJSKI EKRAN ZA CC IN ORDER
CLEAR: EKKN.
SELECT SINGLE * FROM EKKN WHERE ( EBELN = LW_EKPO-EBELN ) AND
( EBELP = LW_EKPO-EBELP ) AND
( KOSTL IN KOSTL ) and
( AUFNR IN AUFNR ).
MOVE EKKN-KOSTL TO INT-KOSTL.
MOVE EKKN-AUFNR TO INT-AUFNR.
CALL FUNCTION 'ME_READ_HISTORY'
EXPORTING
EBELN = LW_EKPO-EBELN
EBELP = LW_EKPO-EBELP
WEBRE = ' '
TABLES
XEKBES = BETS.
LOOP AT BETS WHERE ZEKKN EQ SPACE.
MOVE-CORRESPONDING BETS TO INT.
APPEND INT.
ENDLOOP.
IF SY-SUBRC NE 0.
APPEND INT.
ENDIF.
REFRESH BETS.
CLEAR: LW_EKPO.
ENDSELECT.
CLEAR: LW_EKKO.
ENDSELECT. -
How to hide some select-option of Logical Database in report?
How to hide select-option of Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
Edited by: rongrong wang on Mar 26, 2008 9:31 AMU need to write code in initialization as
initialization.
loop at screen.
if screen-name = 'PNPPERNR-LOW'.
screen-active = '0'.
modify screen.
endif.
if screen-name = 'PNPPERNR-HIGH'.
screen-active = '0'.
modify screen.
endif.
endloop. -
Hi Guys,
I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very importantcheck this code
REPORT ZSELOPT_TO_CLASS .
TABLES: VBRK.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
DATA: IT_VBELN TYPE RSELOPTION.
DATA: X_VBELN TYPE RSDSSELOPT.
CLASS C1 DEFINITION.
PUBLIC SECTION.
DATA: IT_VBRP TYPE VBRP_TAB,
X_VBRP LIKE LINE OF IT_VBRP.
METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
METHODS: DISP_DATA.
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD GET_DATA.
*SELECT * FROM VBRP*
INTO TABLE IT_VBRP
WHERE VBELN IN S_VBELN.
ENDMETHOD.
METHOD DISP_DATA.
LOOP AT IT_VBRP INTO X_VBRP.
WRITE:/ X_VBRP-VBELN,
X_VBRP-POSNR.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA OBJ TYPE REF TO ZCL_SELOPT.
CREATE OBJECT OBJ.
LOOP AT S_VBELN.
MOVE S_VBELN-LOW TO X_VBELN-LOW.
MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
APPEND X_VBELN TO IT_VBELN.
ENDLOOP.
CALL METHOD OBJ->GET_DATA
EXPORTING
S_VBELN = IT_VBELN.
CALL METHOD OBJ->DISP_DATA.
Edited by: moazam hai on May 17, 2008 6:17 AM
Edited by: moazam hai on May 17, 2008 6:19 AM -
How to get all values in the range of select option into internal table?
Hi,
I need to capture all entries coming in the range of select option into one internal table.
How to do get that?
For E.g
select-options: matnr for mara-matnr.(select option)
IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
Regards,
MrunalHello Mrunal Mhaskar ,
What i understand you can do one thing go in debug mode
Try this code : -
LOOP AT s_matnr_ex.
IF s_matnr_ex-low IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-low.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
LOOP AT s_matnr_ex.
IF s_matnr_ex-high IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-high.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
In the i_matnr table high and low values are there.
Regards,
Vandana. -
How to get the values of Select-options from the screen.
The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.
Hi,
Refer this following code..this will solve your problem...
"Following code reads value entered in s_po select options and willprovide search
"help for s_item depending upon s_po value.
REPORT TEST.
TABLES : ekpo.
DATA: BEGIN OF itab OCCURS 0,
ebelp LIKE ekpo-ebelp,
END OF itab.
SELECT-OPTIONS s_po FOR ekpo-ebeln.
SELECT-OPTIONS s_item FOR ekpo-ebelp.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
DATA:
dyn_field TYPE dynpread,
temp_fields TYPE TABLE OF dynpread,
zlv_dynpro TYPE syst-repid.
zlv_dynpro = syst-repid.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = zlv_dynpro
dynumb = syst-dynnr
request = 'A'
TABLES
dynpfields = temp_fields
EXCEPTIONS
OTHERS = 0.
LOOP AT temp_fields INTO dyn_field.
IF dyn_field-fieldname EQ 'S_PO-LOW'.
SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
WHERE ebeln EQ dyn_field-fieldvalue.
EXIT.
ENDIF.
ENDLOOP. -
Report text element as selection option
Hi,
I encounter a performance problem in a report program that include a self define fields in the selection option. I use the FM READ_TEXT to read those fields and compare with the user input.Then, eliminates those unmatched records with if else statement.
Here is my code:
SELECT-OPTIONS: S_WADAT FOR LIKP-WADAT_IST.
PARAMETERS: P_MAWB LIKE WA_REPORT-KZABE.
PARAMETERS: P_HAWB LIKE LIKP-BOLNR.
PARAMETERS: P_MATNR LIKE LIPS-MATNR.
PARAMETERS: P_LOT(20) TYPE C.
CLEAR: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
REFRESH: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
DATA WHERE_TAB(80) OCCURS 10 WITH HEADER LINE.
DATA: BEGIN OF LTEXT OCCURS 50.
INCLUDE STRUCTURE TLINE.
DATA: END OF LTEXT.
IF NOT P_HAWB IS INITIAL.
CONCATENATE ' BOLNR = ' WHERE_TAB INTO WHERE_TAB.
CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
CONCATENATE WHERE_TAB P_HAWB INTO WHERE_TAB.
CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
APPEND WHERE_TAB.
ENDIF.
IF NOT P_MATNR IS INITIAL.
IF NOT WHERE_TAB IS INITIAL.
CONCATENATE ' AND MATNR = ' WHERE_TAB INTO WHERE_TAB.
ELSE.
CONCATENATE ' MATNR = ' WHERE_TAB INTO WHERE_TAB.
ENDIF.
CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
CONCATENATE WHERE_TAB P_MATNR INTO WHERE_TAB.
CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
APPEND WHERE_TAB.
ENDIF.
SELECT A1~VBELN
WADAT_IST
BOLNR
C1~LIFNR
B1~MATNR
LFIMG
BTGEW
B1~CHARG
INTO CORRESPONDING FIELDS OF TABLE TMP_REPORT
FROM LIKP AS A1 JOIN LIPS AS B1 ON A1~VBELN = B1~VBELN
JOIN MCHA AS C1 ON B1~MATNR = C1~MATNR
AND
B1~WERKS = C1~WERKS
AND
B1~CHARG = C1~CHARG
WHERE LFART = 'EL'
AND
WADAT_IST IN S_WADAT
AND
B1~CHARG NE ''
AND
B1~WERKS = 'ABC'
AND
(WHERE_TAB)
SORT TMP_REPORT BY VBELN.
DATA: V_FLAG TYPE I,
V_EXCLUDE TYPE I,
V_LOT_EXCLUDE TYPE I.
V_FLAG = 0.
V_EXCLUDE = 0.
V_LOT_EXCLUDE = 0.
IF SY-SUBRC = 0.
* trim the parameter space
SHIFT P_MAWB RIGHT DELETING TRAILING SPACE.
SHIFT P_MAWB LEFT DELETING LEADING SPACE.
SHIFT P_LOT RIGHT DELETING TRAILING SPACE.
SHIFT P_LOT LEFT DELETING LEADING SPACE.
LOOP AT TMP_REPORT.
AT NEW VBELN.
V_FLAG = 1.
V_EXCLUDE = 0.
ENDAT.
IF V_FLAG = 1.
PERFORM GET_HEADER_TEXT
TABLES
LTEXT
USING
'Z3IH'
TMP_REPORT-VBELN
READ TABLE LTEXT INDEX 1.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-VERUR TMP_REPORT-VERUR.
READ TABLE LTEXT INDEX 2.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-KZGBE TMP_REPORT-KZGBE.
READ TABLE LTEXT INDEX 3.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-KZABE TMP_REPORT-KZABE.
READ TABLE LTEXT INDEX 4.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-STABE TMP_REPORT-STABE.
READ TABLE LTEXT INDEX 5.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-PRONU TMP_REPORT-PRONU.
READ TABLE LTEXT INDEX 6.
SPLIT LTEXT-TDLINE AT ':' INTO
TMP_REPORT-LADEL TMP_REPORT-LADEL.
SHIFT TMP_REPORT-KZABE RIGHT DELETING TRAILING SPACE.
SHIFT TMP_REPORT-KZABE LEFT DELETING LEADING SPACE.
MOVE-CORRESPONDING TMP_REPORT TO WA_REPORT.
MOVE-CORRESPONDING TMP_REPORT TO WA_TMPREPORT.
V_FLAG = 0.
ELSE.
MOVE TMP_REPORT-VBELN TO WA_REPORT-VBELN.
MOVE TMP_REPORT-LIFNR TO WA_REPORT-LIFNR.
MOVE TMP_REPORT-MATNR TO WA_REPORT-MATNR.
MOVE TMP_REPORT-LFIMG TO WA_REPORT-LFIMG.
ENDIF.
PERFORM GET_LOT_CODE USING
WA_REPORT-MATNR
'3LTU'
WA_TMPREPORT-CHARG
WA_REPORT-LOT.
IF V_EXCLUDE 1 AND P_MAWB NE ''
AND WA_TMPREPORT-KZABE NE P_MAWB .
V_EXCLUDE = 1.
ENDIF.
SHIFT WA_REPORT-LOT RIGHT DELETING TRAILING SPACE.
SHIFT WA_REPORT-LOT LEFT DELETING LEADING SPACE.
IF P_LOT NE '' AND P_LOT NE WA_REPORT-LOT.
V_LOT_EXCLUDE = 1.
ELSE.
V_LOT_EXCLUDE = 0.
ENDIF.
IF V_EXCLUDE 1 AND V_LOT_EXCLUDE 1.
APPEND WA_REPORT TO I_REPORT.
CLEAR WA_REPORT.
CLEAR TMP_REPORT.
ENDIF.
ENDLOOP.Hi,
i found one perfromance issue, try to remove the "INTO CORRESPONDING FIELDS OF TABLE " in your select statement, the order of the fields that you are fetching and the oreder for the fields in your internal table structure should be same, then you can remove "INTO CORRESPONDING FIELDS OF TABLE " and while fetching the fields reffer the table and fields you need to fetch here also you need to main the same order...like you have to do the same in where condition.
Reward if needful.
Thanks,
Sreeram. -
Hi experts,
In my alv report there is one field SERNR serial number, for this i have to put select option. My problem is this field doesn't exist in the table(Zmanifest) from where i'm fetching data. So i'm not able to mention this select option in my select query for that particular table. This field is existing in EQUI table and have no relation defined between zmanifest table & EQUI.
In my internal table i have all fields of zmanifest & this sernr; to fulfill this field logic is
Serial Number is combination of P_PREFIX-(dash)P_SERIAL fields in zmanifest. I have fetch all data including SERNR by above logic at my grid; but facing problem in defining SELECT-OPTIONS for Sernr.
Please help.
Points Sure.
AnshumanHi,
do like this.
take the lenght of P_PREFIX
take the lenght of P_SERIAL
add the length.
for exmaple :
P_PREFIX size is 4.
P_SERIAL size is 10
now declare the variable like this.
data : v_selop(15).
Note : 4101 = 15, so i declared the variable with lenght of 15.
select-options : so_field for v_selop.
now use off-set in your select query like this:
where PREFIX = v_selop+0(4)
and SERIAL = v_selop+5(10)
it will work if you are using variable v_selop as a parameter else if you are using select option you have to break v_selop into two different select option like this:
s_prefix type prefix,
s_serial type serial.
loop at v_selop.
s_prefix-* = v_selop-. " ( = sign, option)
s_serial-* = v_selop-*.
s_prefix-low = v_selop-low+0(4).
s_serial-low = v_selop-low+5(10).
s_prefix-high = v_selop-high+0(4).
s_serial-high = v_selop-high+5(10).
endloop.
now use following select query
where PREFIX in s_prefix
and SERIAL in s_serial.
it will surely wrok.
Regards-
Gagan Kumar
Plz Reward if need full. also close the question.
Edited by: Gagan Kumar on May 18, 2008 7:30 PM -
Help on Dynamic values in select options
Hi All,
I need help for the following.
1. I have two select options for fields VBAK-VBELN and VBAK-ERDAT one after the other.
2. When I select VBELN through F4 in the first select option then the corresponding ERDAT should be displayed in second select option.
Please let me know how to do thisUse the below code
tables: pa0000, pa0001.
parameters: p_chk1 as checkbox user-command rusr,
p_chk2 as checkbox user-command rusr,
p_chk3 as checkbox user-command rusr,
p_chk4 as checkbox user-command rusr,
p_chk5 as checkbox user-command rusr.
selection-screen: begin of block blk1 with frame.
select-options: s_pernr for pa0000-pernr modif id ABC,
s_stat2 for pa0000-stat2 modif id DEF,
s_werks for pa0001-werks modif id GHI,
s_persg for pa0001-persg modif id JKL,
s_persk for pa0001-persk modif id MNO.
selection-screen: end of block blk1.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF p_chk1 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'DEF'.
IF p_chk2 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'GHI'.
IF p_chk3 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'JKL'.
IF p_chk4 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'MNO'.
IF p_chk5 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*Note
*Titles for check boxes and select options
*P_CHK1 Personal Number
*P_CHK2 Employment Status
*P_CHK3 Personnel Area
*P_CHK4 Employee Group
*P_CHK5 Employee Sub group
*S_PERNR Personal Number
*S_PERSG Employee Group
*S_PERSK Employee Sub group
*S_STAT2 Employment Status
*S_WERKS Personnel Area -
Hi.
I have this small program with a select-options s_tran.
I need to call function Z_UNLOCK for each entry in s_tran.
How can I make that?
Thanks
Best regards
PARAMETERS: p_warn TYPE ltap-LGNUM.
SELECT-OPTIONS: s_tran FOR LTAK-tanum.
loop at ......................?????
CALL FUNCTION 'Z_UNLOCK'
EXPORTING
iv_warehouse = p_warn
iv_tanum = s_tran-tanum
language = sy-langu
IMPORTING
return = return.
IF return-type = ''.
EXIT.
ENDIF.
Endloop.hi,
try to use this code:
>PARAMETERS: p_warn TYPE ltap-LGNUM.
>SELECT-OPTIONS: s_tran FOR LTAK-tanum.
>data: lt_ltak type ltak occurs 0 with header line.
>start-of-selection.
>select * from ltak into table lt_ltak where tanum in s_tran.
>
>
>loop at lt_ltak.
>
>CALL FUNCTION 'Z_UNLOCK'
>EXPORTING
>iv_warehouse = p_warn
>iv_tanum = lt_ltak-tanum
>language = sy-langu
>IMPORTING
>return = return.
>
>IF return-type = ''.
>EXIT.
>ENDIF.
>
>Endloop.
bye
Marco
Maybe you are looking for
-
The most frequent site is not at top of list on location bar dropdown in 10.0.2
Previous version ordered the drop down history on locator bar by frequency of use. This meant my most commonly visited site was at top of list and I used that to select my site. Now it's halfway down the history list and more inconvenient to access.
-
FaceTime video recording?
I've currently been scouring the description of FaceTime for this and have yet to find anything about it. I believe that it would be really neat that if while using FaceTime the iPhone would have the ability to record video from the 720p camera on th
-
Disabling prompts blocks InfoPath publishing
I have a SharePoint 2010 Enterprise environment with InfoPath 2010. Using several forms published as content types in several site collections, all working fine. Users are getting prompted Open/Save of documents in libraries (word, excel) - Office W
-
Windows 2008 R2 ADCS install fails
Hello, I am trying to install a Standalone Root CA on a Windows 2008 R2 machine. Each time I try to install the role it says installed with errors. The error is 0x80070422, I am only trying to install the CA and CA Web Enrollment roles. I can g
-
I have used oracle 9.2 for 3 months. I install oralce client 9.0 in my computer. when I write stored procedure. I used SQL Plus to compile. We use package to wrap a store proceure in sql file. we use ref cursor variable to reture record sets to clien