2010 Apr 05 11:28 AM
Hi,
when i use parameter then i wil show company code in smart-form output
but when i use select option then its throwing error parameter specified here is different
what should i do in this case i want to design a big select option screen for taking user input
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS.pls help me in this regards.
ketan..
2010 Apr 05 11:33 AM
Hi,
In you smartform interface,Bukrs is define as TYPE BUKRS, So it can only accept single value. Your select option is kind of internal table, so change your form interface in smartform so that it can accept table also.
Edited by: Anurag_n on Apr 5, 2010 12:33 PM
2010 Apr 05 11:36 AM
hi
thnx for your reply
can u pls elaborate in my code
now i changed code BUKRS = SO_BUKRS-low.
either i can give low or high but how to select from range
REPORT ZMM.
TABLES BSEG.
DATA : V_FORMNAME TYPE TDSFNAME VALUE 'ZPUR_REG',
V_FMNAME TYPE RS38L_FNAM.
*PARAMETERS SO_BUKRS TYPE BUKRS.
SELECT-OPTIONS : SO_BUKRS FOR BSEG-BUKRS.
DATA : Z_CONTROL TYPE SSFCTRLOP, "Smart Forms: Control structure
Z_OPTIONS TYPE SSFCOMPOP. "SAP Smart Forms: Smart Composer (transfer) options.
MOVE 'X' TO : Z_control-no_dialog, "SAP Smart Forms: General Indicator
Z_options-tdnewid, "New Spool Request (Print Parameters)
z_control-PREVIEW. "Print preview
MOVE 'LP01' TO Z_options-tddest. "Spool: Output device
MOVE space TO Z_options-tdimmed. "Print Immediately (Print Parameters).
MOVE 'PRINTER' TO Z_control-device. "Output device
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORMNAME
IMPORTING
FM_NAME = V_FMNAME.
CALL FUNCTION V_FMNAME
EXPORTING
CONTROL_PARAMETERS = Z_CONTROL
OUTPUT_OPTIONS = Z_OPTIONS
USER_SETTINGS = ''
BUKRS = SO_BUKRS-low.ketan..
2010 Apr 05 11:40 AM
Hi,
Either you change the smartform interface BUKRS to table of type SELOPT. or select the company code from table t001 based on the selection screen field and pass the required company code value to BUKRS.
Hope this will help.
Regards
Shibino
2010 Apr 05 11:40 AM
Hi Ketan,
If you write so_bukrs-low, it will pass a single value to the smartform and will not consider any other value even if it is entered.
Thanks & Regards
Rocky
2010 Apr 05 11:43 AM
Hi,
Open Smartform--->Form interface>import-->(parameter name)bukrs (type assignment ) TYPE , (Associated type) T_BUKRS.
or you can paas it through table parameter there, this is similar to how we pass table in function module.
but my question what you going to do with list of Bukrs in smart form?
Edited by: Anurag_n on Apr 5, 2010 12:44 PM
Edited by: Anurag_n on Apr 5, 2010 12:45 PM
2010 Apr 05 11:46 AM
In continuation of my earlier reply.
Decalre your internal table in form interface as well and you will have the complete list of BUKRS in your internal table and you can use it as you want to.
2010 Apr 05 12:23 PM
hi
thanx for ur reply
i know low and high use but i want company code 0550 to 0850
so how can i select into smart forms using select options.
ketan
2010 Apr 05 12:27 PM
hi,
In smartform interface declare BUKRS as table of type selopt.
Pass the select option table to S_BUKRS[] to new interface table.
Regards
Shibino
2010 Apr 05 1:01 PM
Hi,
Basically you need to pass the select option as a table from the program and then from the smartform, you need to use it.
Check the above link. I have explained the same in step by step procedure.
2010 Apr 05 11:39 AM
You are getting this error bcoz of the type conflict.
I assume that you want to pass multiple values for BUKRS.This can be achieved by using an internal table having bukrs as a field and before passing to the FM fill this internal table with all the values from the select option.Pass this internal table to the FM
Data:begin of itab occurs 0
bukrs like bukrs,
end of itab.
Fiil this itab with select option values.
Call function SSF_.....
eXPORTING
'
'
iTAB = ITAB
This will solve your issue.
2010 Apr 05 11:42 AM
Hi Ketan,
" Any Confusion StillIn your Smarform Form Interface change bukrs type as TRGS_COMPANY_CODE This is of type Ranges
then activate your smartform and program as well and execute it
Cheerz
Ram
2010 Apr 05 12:21 PM
hi
thanx for your reply
i used BUKRS TYPE TRGS_COMPANY_CODE
in form interface but when i run the driver program then its showing
field bukrs invalid type 'U'
i want the output in the form of range how can i do so
i know how to declare
tables
it = it.
but in my case i don used any tables
pls give details
ketan..
2010 Apr 05 12:53 PM
Hi Ketan,
You can declare your company code S_BURKS as of TYPE SELOPT in the TABLE section of smartform interface declaraction.
Thanks,
Chinmay
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |