05-30-2006 2:07 PM
Can someone pls tell how to create a selection screen for providing inputs to a print workbench application form?
05-30-2006 2:53 PM
I don't think u can create a selection screen for print workbench. Print workbench are attached thro' SPRO, which are called automatically with appropriate data.
05-30-2006 6:37 PM
Hi Amit,
Thanks for ur response!
I need a selection screen containing 2 fields BP and Contract acc no. while executing Appln form. Where should I write the code for that?
Is it inside the exit, which I have created while creating the form class? But,I cannot define selection screen block inside an user-exit.
In that case, how should I proceed?
Moreover, I want to know, where should I put the conditions (logic) for data selection for my smartform ?Is it inside the smartform or in the PWB?
It'll be a great help if u can explain the process.
Lastly, could u pls provide me some material / documentation on Smartform preparation using PWB, as I 'm quite new to this?
This is urgent!
Awaiting help.
05-30-2006 6:49 PM
Hi Anshumita,
Please refer the code which I have already sent in the previous post. You can use the function module 'POPUP_GET_VALUES' to display your screen and this code you can write in the exit of your application form.
Pass the selection field information to this function module. Say you want to display the Partner_No field on the selection screen then pass the information in this way.
Add Contact partner field
CLEAR wa_scrfields.
wa_scrfields-tabname = 'BUT000'.
wa_scrfields-fieldname = 'Partner'.
wa_scrfields-fieldtext = 'Partner_No'.
APPEND wa_scrfields TO git_scrfields.
Repeat this for all the fields that you want to display and pass it to the function module.
After the user enters the values in the selection screen, the input values will be available in the same internal table that you pass to the FM.
Use this internal table as you want.
<b>Reward points if it helps.</b>
Regards,
Amit Mishra
05-30-2006 2:59 PM
Hi,
In the start or end exit of the application form write the following code to get the user input.
FORM f1000_get_user_input.
DATA: wa_scrfields TYPE sval.
CONSTANTS : lc_but050(10) TYPE c VALUE 'BUT050',
lc_but000(10) TYPE c VALUE 'BUT000',
lc_dfkkcoh(7) TYPE c VALUE 'DFKKCOH',
lc_servcont(10) TYPE c VALUE 'SOBJECTFVD',
lc_service(20) TYPE c VALUE 'Service Contract No',
lc_ztcorr_sign(15) TYPE c VALUE 'ZTCORR_SIGN',
lc_ztcorr_code(15) TYPE c VALUE 'ZTCORR_CODE',
lc_ztcrm_addrtyp(15) TYPE c VALUE 'ZTCRM_ADDRTYP',
lc_5 VALUE '5',
lc_title_welcome(20) TYPE c VALUE 'WELCOME LETTER',
lc_contact(20) TYPE c VALUE 'Contact Partner',
lc_department(20) TYPE c VALUE 'Department',
lc_address_type(20) TYPE c VALUE 'Address Type',
lc_partner2(10) TYPE c VALUE 'PARTNER2',
lc_partner(10) TYPE c VALUE 'PARTNER',
lc_signcode(10) TYPE c VALUE 'SIGNCODE',
lc_addr_typ(10) TYPE c VALUE 'ADDR_TYP',
lc_letrvar(10) TYPE c VALUE 'LETRVAR',
lc_cm33 TYPE dfkkcoh-cotyp VALUE 'CM33'.
* Add Contact partner field
CLEAR wa_scrfields.
wa_scrfields-tabname = lc_but050.
wa_scrfields-fieldname = lc_partner2.
wa_scrfields-fieldtext = lc_contact.
APPEND wa_scrfields TO git_scrfields.
* Add Service Contract field
CLEAR wa_scrfields.
wa_scrfields-tabname = lc_dfkkcoh.
wa_scrfields-fieldname = lc_servcont.
wa_scrfields-fieldtext = lc_service.
APPEND wa_scrfields TO git_scrfields.
*Add Address Type field
CLEAR wa_scrfields.
wa_scrfields-tabname = lc_ztcrm_addrtyp.
wa_scrfields-fieldname = lc_addr_typ.
wa_scrfields-fieldtext = lc_address_type.
APPEND wa_scrfields TO git_scrfields.
* Add Letter Variant field
CLEAR wa_scrfields.
wa_scrfields-tabname = lc_ztcorr_code.
wa_scrfields-fieldname = lc_letrvar.
APPEND wa_scrfields TO git_scrfields.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = lc_title_welcome
start_column = lc_5
start_row = lc_5
TABLES
fields = git_scrfields
EXCEPTIONS
error_in_fields = 0
OTHERS = 0.
IF sy-subrc NE 0.
EXIT.
ENDIF.
<b>Reward points if it helps.</b>
05-31-2006 5:20 AM
Hi Amit,
Thanks for the reply.
But ,What should I provide as an input in the value table which comes when I execute the application form?
for testing purpose I have put a message in the user exit, but while executing the application form (I dont know what to put in the value table 0, value table 1,value table 2 and so on)as I am not giving any input to the value tables it is giving error as:
"Program error during data procurement for printing!"
Do u have any idea about the same error?