How to SELECT-OPTIONS in smartforms
Hi Experts,
I am create the smartform using parameter but req. is need to SELECT-OPTIONS instead of parameter how to use in smartform.
Thanks un Advance.
purnaneelu
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jun 11, 2009 4:18 PM
Hi Purnaneelu,
plese try in this way
proior to doing the above thing..in the SMART FORM you have to do the following things first
1)Create a Structure ZSTRUC in SE11 with the required fields.
2)In smart form u2018ZXXXXXu2019, create an entry in to TABLES tab "parametername in the Form Interface.
3)Define Structures in TYPES tabs in GLOBAL DEFINITIONS.
4)Write the logic in the main window "program Lines".
5)Loop the internal table you have used in the smartform. then follow as the below driver program procedure this will solve your problem
tables:<your table from which you are fetching the data>
select-options.
s_<fieldname> for <tablename-fieldname>.
data: fname type rs38L_fname. "this is for the function module name
Start-of-Selection.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = <your form name>
IMPORTING
FM_NAME = fname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
*now call the function module which will be generated when you create the smart form, and replace the form name with "fname"
CALL FUNCTION <fname>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
(or)
call function fname
tables
<the table name which you have used in the FORM INTERFACE parameter name> = <the checking value>
Regards,
Abdul Samad.
Similar Messages
-
Hi all,
Is't possible to use Select-options in smartforms, If so how to use.
Regards
SuprithHi,
yes it is possible
1 Create a Structure ZSELECTION in SE11 with following fields
SIGN
OPTION
LOW
HIGH
This structure is similar to the selection-option internal table.
2 In smart form u2018ZSELECT_FORMu2019, create an entry in to TABLES in the Form Interface.
3 Define Structures in TYPES tabs in GLOBAL DEFINITIONS
4. Do the global declartation
5 go to mainwindow
create-->Flow logic -
> program lines
The PERNRS given in the select-option in the driver program is captured in T_SELECT. In program lines, T_SELECT is input to SELECT query and the results are captured in internal table T_0002. We have to mention resulted internal table T_0002 in output parameters for further use.
loop the internal table
wite the printporam
Thanks & Regards
Ramakrishna Pathi
then provide the input and output parameters -
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. -
Can we use select options in smartform
can we use select options in smartform if so can any one send me a sample code...
Thanks
bhaskharHi ,
Can u explain why u want to use select options in smartforms . U can try it in program lines .
Its better to use select options in the driver program and fetch data accordingly in the driver program or passing the selected values from select options to the smatfrom and fdetching the data there in smartform .
Regards -
Hi everybody,
can anybody give me clarification that. . . . can we use select-options in smartforms ?
thanks in advance.Hai.
check the links.
http://www.****************/Tutorials/Smartforms/SelectOptions/Demo.htm
http://www.****************/Tutorials/Smartforms/SFMain.htm
Re: smart forms
regards.
sowjanya.b -
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 -
Hiiiii,
I am new to smartforms and i need to show range of dates in smartforms.
I am trying in driver prog. n i got correct data in final internal table but cant
fetch correct data using fm in driver prog.
Thank You...Hi,
1 Create a Structure ZSELECTION in SE11 with following fields
SIGN
OPTION
LOW
HIGH
This structure is similar to the selection-option internal table.
2 In smart form u2018ZSELECT_FORMu2019, create an entry in to TABLES in the Form Interface.
3 Define Structures in TYPES tabs in GLOBAL DEFINITIONS
4. Do the global declartation
5 go to mainwindow
create-->Flow logic -
> program lines
The PERNRS given in the select-option in the driver program is captured in T_SELECT. In program lines, T_SELECT is input to SELECT query and the results are captured in internal table T_0002. We have to mention resulted internal table T_0002 in output parameters for further use.
loop the internal table
wite the printporam
Regards,
DHina.. -
How to select option to the particular view container
Hi All,
I am working on ALV , i have view container for search parameters, here i want to add select option in to the same view container.. anyone help me to achive the same.
Thanks
RamAs Tamil said above, you have to put the select options in the view that you are embedding in the view container. For help on how to use select options in webdynpro, you can have a look at the tutorial in the following link...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c09fec07-0dab-2a10-dbbe-c9a26bdff03e -
Geting select option value on the basis of filtering criteria
Hi
I have a selection parameter field is PRPS-WERKS. when user will go for f4 help, the value should come as filtered on the basis of the condition : select the respective WBS ELEMENT (PRPS- PSPNR) and select the respective PR LINE item. (The relation is PRPS-PSPNR=EBKN-PS_PSP_PNR and EBKN-BANFN = EBAN-BANFN and EBKN-BNFPO = EBAN-BNFPO).now the value iof WERKS is not comming from the database table PRPS itself. how to manage this thing?Hi,
Refer the link select option in smartforms and read what i suggested..
Regards,
Dhina.. -
Take count on consecutive selections of SELECT-OPTIONS.
Hi Experts,
i am new to ABAP Development. My client has given a requirement in which i have to calculate count of Documents under
selected Document types. The Document types is to be selected in Select-options. i have to to do multiple selections in this.
But i have to take count of consecutive selections using select-options. Means for first time i will click select-options,give multiple selections and take count of documents corresponding to given Document types and save in count1.
2nd time : Now again i have to select same select-options to take count of documents of different Document Types and save in count2.
Is any event has to be triggered in this ...if yes then how.
SELECT-OPTIONS Doc_type for bkpf-blart.
select count(*) from bkpf into it_loc-wa where bkpf~blart in Doc-type.
And then i have to create a report using first count1 and second count2.
Please help me.
Regards:
Mohammed Shahab AnsariHi
Can you be more clear on the requirement please. Why do you want to get the number of documents for the document selected on the selection screen? Is your requirement to get the documents belonging to that document type and again trigger another selection screen based on that selection ?
If you just want to get the count from your selection screen and then may be try the below code.
tables: bkpf.
data: ld_count type i.
data: begin of lt_count occurs 0,
dtype type bkpf-blart,
count type i,
end of lt_count.
SELECT-OPTIONS: s_Dtype for bkpf-blart.
loop at s_dtype.
select count(*) from bkpf into ld_count where bkpf~blart = s_Dtype-low.
lt_count-dtype = s_dtype-low.
lt_count-count = ld_count.
append lt_count.
clear lt_count.
endloop.
loop at lt_count.
write: /5 lt_count-dtype, lt_count-count.
endloop.
Regards,
Vijay V -
How to use parameter option in smartform program line.
HI all,
how can i give parameter for matnr directly in smartform program line, it wont take gives a dump
i don wanna create a separate driver program for that.
Error in the ABAP Application Program
The current ABAP program "/1BCDWB/SF00000001============FT" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "/1BCDWB/SAPLSF00000001 " in
include "/1BCDWB/LSF00000001F01 " in
line 539:
"You can only use "PARAMETERS" for programs other than type 1 between B"
"EGIN/END OF SCREEN."
The include has been created and last changed by:
Created by: "SAPUSER "
Last changed by: "SAPUSER "
how can i solved this.
Kavinath B.Hi,
You can not code
SELECTION-SCREEN BEGIN OF BLOCK.
SELECT-OPTIONS selcrit FOR (name).
SELECTION-SCREEN END OF BLOCK.
like this in smartform program line it wont allow
all you have to do is create a driver program
for smartform create a selection screen and call smartform by
n pass variables or internal tables.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname =
* VARIANT = ' '
* DIRECT_CALL = ' '
* IMPORTING
* FM_NAME =
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 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.
I hope it will help u
Ketan.P -
Problem in Passing the select-options data in smartforms
Dear ABAPers,
I have developed new layout for Delivery Chellan using smartforms.
using parameters i am getting document no, corresponding all details getting print.
but the client wants to use multiple document no.
in function module also i am passing only one import parameter (i.e. doc.no).
my requirement is how to pass multiple data in smartfroms.
Thanks & Regards,
AshokDear ABAPers,
Here i give my code Please check it out and tell me where i am going wrong.
*& Report ZMM_DC_FORM *
REPORT ZMM_DC_FORM .
Data Declaration
tables : mseg,
mkpf,
ekpo,
ekko,
objk,
mbew,
ser03,
twlad,
makt,
adrc.
data : begin of struct_mblnr,
mblnr type mblnr,
end of struct_mblnr.
data : it_mblnr like table of struct_mblnr with header line.
data : begin of i_struct,
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
matnr like mseg-matnr,
erfmg like mseg-erfmg,
werks like mseg-werks,
lgort like mseg-lgort,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
umwrk like mseg-umwrk,
end of i_struct.
data : begin of bednr_struct,
matnr type ekpo-matnr,
bednr type ekpo-bednr,
end of bednr_struct.
data : begin of price_struct,
matnr type mseg-matnr,
verpr type mbew-verpr,
stprs type mbew-stprs,
end of price_struct.
data : begin of serial_struct,
matnr like objk-matnr,
sernr like objk-sernr,
end of serial_struct.
data : begin of fi_struct,
matnr type mseg-matnr,
maktx type makt-maktx,
bednr type ekpo-bednr,
erfmg type mseg-erfmg,
verpr type mbew-verpr,
val_p type mbew-verpr,
end of fi_struct.
data : it_tab like table of i_struct with header line.
data : it_add1 type table of adrc with header line,
it_add2 type table of adrc with header line.
data : it_bednr like table of bednr_struct with header line.
data : it_price like table of price_struct with header line.
data : it_ser type table of ZMM_DC_SERIAL with header line.
data : it_final like table of fi_struct with header line.
data : s_date like mkpf-budat.
data : s_ebeln like ekpo-ebeln.
DATA : FM_NAME TYPE RS38L_FNAM.
Selection Screen Variables
selection-screen : begin of block b1 with frame title text-001.
select-options : s_mblnr for mseg-mblnr.
parameters : s_mjahr type mseg-mjahr.
selection-screen : end of block b1.
Start of Selection
start-of-selection.
select mblnr from mseg into table it_mblnr where mblnr ge s_mblnr-low
and mblnr le s_mblnr-high.
delete adjacent Duplicates from it_mblnr.
*loop at it_mblnr.
*write : it_mblnr-mblnr.
*endloop.
loop at it_mblnr.
select mblnr
mjahr
matnr
erfmg
werks
lgort
ebeln
ebelp
umwrk from mseg into table it_tab where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr
and xauto <> 'X'.
read table it_tab index 1.
*code for PO Number
s_ebeln = it_tab-ebeln.
*code for Supplying plant address
select single adrnr from twlad into twlad-adrnr where werks = it_tab-werks
and lgort = it_tab-lgort.
select single * from adrc into it_add1 where addrnumber = twlad-adrnr.
clear twlad-adrnr.
*code for receiving plant address
select single lgort from ekpo into ekpo-lgort where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp.
select single adrnr from twlad into twlad-adrnr where werks = it_tab-umwrk
and lgort = ekpo-lgort.
select single * from adrc into it_add2 where addrnumber = twlad-adrnr.
clear : twlad-adrnr,
ekpo-lgort.
*code for the Material Document Date
select single budat from mkpf into s_date where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr.
loop at it_tab.
it_final-matnr = it_tab-matnr.
it_final-erfmg = it_tab-erfmg.
*Code for Material Description
select single maktx from makt into makt-maktx where matnr = it_tab-matnr.
it_final-maktx = makt-maktx.
clear makt-maktx.
*Code for Service order Number
select single matnr
bednr from ekpo into it_bednr where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp
and matnr = it_tab-matnr.
it_final-bednr = it_bednr-bednr.
*Code for Price for the Material
select single matnr
verpr
stprs from mbew into it_price where matnr = it_tab-matnr
and bwkey = it_tab-werks.
if it_price-verpr <> 0.
it_final-verpr = it_price-verpr.
else.
it_final-verpr = it_price-stprs.
endif.
it_final-val_p = it_final-erfmg * it_price-stprs.
append it_final.
clear it_final.
endloop.
*Code for Serial Number
select single obknr from ser03 into ser03-obknr where mblnr = it_mblnr-mblnr
and vorgang = 'MMSL'.
select matnr
sernr from objk into table it_ser where obknr = ser03-obknr.
clear ser03-obknr.
*Calling Function Module for Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZMM_DC_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION FM_NAME
EXPORTING
L_MBLNR = it_mblnr-mblnr
L_DATE = S_DATE
L_EBELN = S_EBELN
IT_ADD1 = IT_ADD1
IT_ADD2 = IT_ADD2
TABLES
IT_FINAL = IT_FINAL
IT_SER = IT_SER.
endloop.
Please help me to solve this problem.It is very urgent.
Thanks & Regards,
Ashok. -
hi everyone,
i m developing a po in smartforms. now i want to give the select-option on selection screen and accordingly i want to print po.s continuesly as given by user in in select-options,.so can u tell em how its is deal in program as well as in smartforms wt i will hav to do.Hi,
Let me know whether my understanding is correct.
You are passing po no. as select-option in selection screen of driver program.
You want to print the po no. entered in selection screen thro' smartform.
If the above is the requirement,develop a ztable in SE11 with fields low,high,sign,option.
Pass the select-option value from driver program as table.
In the smartform,form-Interface->tables
itab like ztable -
Symaltaneous use of select-option and parameters in smartforms .
hello Abaper,
I am design a smartforms . we have given some input. when we use only parameters it works properly. as same when we use select-option only its works .
But when i use both parameter and select option at that time error generate .
Actually call function is not works .
So please give me proper idea how to solve this problem .
Regards
kamal kishoreHi ,
Still problem is not solved.
i want to call following fields but function modules show run time error. IF separately i call only parameter its run properly.
in the same way if i call only select option is runs properly.
please suggest me how can i call both the things.
PARAMETERS: P_BUKRS TYPE BSEG-BUKRS OBLIGATORY,
P_GJAHR TYPE BSEG-GJAHR OBLIGATORY.
parameters: P_SECCO type SECCODE-SECCODE OBLIGATORY.
*SELECT-OPTIONS : P_SECCO FOR SECCODE-SECCODE OBLIGATORY.
PARAMETERS: P_QSCOD TYPE J_1IEWTNUMGR-QSCOD OBLIGATORY.
SELECT-OPTIONS: P_BUDAT FOR BKPF-BUDAT OBLIGATORY,
P_BLART FOR BKPF-BLART,
P_J_HLN FOR J_1IEWTCHLN-J_1IEXTCHLN,
P_J_HDT FOR J_1IEWTCHLN-J_1IEXTCHDT OBLIGATORY,
P_LIFNR FOR LFB1-LIFNR.
regards
kamal
Edited by: kamal_kishore_sah on Apr 12, 2011 7:44 AM -
Smartforms with selection-option
HI Experts,
Well i have done a customer statement with a smartforms.
Currently the print program have a parameter for the customer (kunnr) field.
But my new requirment is i need to change it to select-options.
But i how to configure the smartforms.
Just say i have 2 customers and i need to have a separeted page for both customers and
their address should also in different page.
Please give me the logic.
Thanks a lot.
s.saravannan.....Hi saravannan sithambaram,
Loop at itab, - in which we have 2 customers....
CALL SF
ENDLOOP.
Paste the CALL SF fucntion, to know how they are passing address of them ... for more clarification..
Paste the internal tables and code how didi they do it...
Regards,
Suneel G
Maybe you are looking for
-
How to restore from hard drive that won't boot?
My Macbook Pro recently started hanging at the grey boot screen, and the hard drive was replaced under Applecare. I've got the old hard drive in a USB enclosure now, and everything on it seems to be readable despite it refusing to boot from this hard
-
Hello I have a requirement where budgets have to be fixed project wise. For example Raw materials. I am able to create monthly budget for GL Accounts for each project wise raw material. If I create separate GL Accounts. My problem is that he want b
-
Http error 404 when accessing facebook pages
HI there I have read a few of the previous help requests and tried to turn my mobile netwok off and on and a hard reboot, but I still can't access facebook pages via an email link. I get a message about a reply say to a comment and when I click thr
-
Safari no longer saves new Bookmarks (OS X 10.8.3 - Safari 6.03)
I am trying to save bookmarks as I always had done, simply no bookmark gets saved. I reset Safari.
-
Pdf printing gets a black screen, and unable to save
When saving a pdf (saving as), I get a message "unable to save as ...", when printing, it print all black pages... The file is OK, as I am able to perform both operations from IE running in parallel...