‎2009 Nov 26 6:12 PM
Hi!
I have created a small program to call a blank BOL .
It basically calls the smartform and we can see the print preview or take a print out of the
form in the output. Basically a blank BOL.
I would like this program to run in such a way that
there will be options to enter the receiver , transporter
and shipping instruction somewhere in teh selection screen and
then when we execute the program it gives the output
of teh form with the details eneterd .
Basically I need to output the form with the details that I
enetr in the sel;ection screen.
Could anyone please guide me through this please.
Thanks
‎2009 Nov 27 4:50 AM
MAKE PARAMETERS WHICH YOU WANT TO GET PRINTED ON THE SMARTFORM AS ENTERED BY THE USER
*ALSO ADD THESE IN THE SMARTFORM IN THE FORM INTERFACE OF SMARTFORMS
PARAMETER: P_DATE LIKE SY-DATUM.
PARAMETER: P_REAS TYPE CHAR25.
DATA : FM_NAME TYPE RS38L_FNAM.
DATA : FORM_NAME TYPE tdsfname .
FORM_NAME = 'ZXYZ'.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = FORM_NAME
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
.
CALL FUNCTION FM_NAME
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
MYDATE = P_DATE
REASON = P_REAS
* 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
.Edited by: Anirudh Singh Rawat on Nov 27, 2009 5:51 AM
Edited by: Anirudh Singh Rawat on Nov 27, 2009 6:04 AM
‎2009 Nov 26 6:50 PM
‎2009 Nov 26 6:55 PM
Patience please Aarav. The people here have other things to do.
Rob
‎2009 Nov 26 7:07 PM
Hi
You need to create a smartform with an interface having as import parameters the data entered in the selection-screen.
Then I suppose u need to place (inside the smartform) some abap code to get the other information to be printed.
Max
‎2009 Nov 26 9:40 PM
Halo Aarav,
The smartforms are nothing but Function Modules . You need to have driver program to call the smartform Function Module . So in the selection screen of the driver program you get these values from the user and populate your internal table . Then pass this values are parameters to the Smartform FM
‎2009 Nov 27 4:11 AM
Hi,
This the select paramters declared in driver program
PARAMETERS: p_date TYPE char10.
export it to form FM.
CALL FUNCTION fm_name
EXPORTING
..
p_date = p_date
TABLES
..
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
declare a variable in smartform->Form interface->import
then pass that value to the window where you needed.
‎2009 Nov 27 4:50 AM
MAKE PARAMETERS WHICH YOU WANT TO GET PRINTED ON THE SMARTFORM AS ENTERED BY THE USER
*ALSO ADD THESE IN THE SMARTFORM IN THE FORM INTERFACE OF SMARTFORMS
PARAMETER: P_DATE LIKE SY-DATUM.
PARAMETER: P_REAS TYPE CHAR25.
DATA : FM_NAME TYPE RS38L_FNAM.
DATA : FORM_NAME TYPE tdsfname .
FORM_NAME = 'ZXYZ'.
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = FORM_NAME
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
.
CALL FUNCTION FM_NAME
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
MYDATE = P_DATE
REASON = P_REAS
* 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
.Edited by: Anirudh Singh Rawat on Nov 27, 2009 5:51 AM
Edited by: Anirudh Singh Rawat on Nov 27, 2009 6:04 AM
‎2009 Nov 27 5:23 AM
Hi,
You can try creating one report program with an tcode in which
cretae the selection screen with the required input parameters
and then in that report call function module:
'SSF_FUNCTION_MODULE_NAME' in which you can pass your
form name.
Hope it helps
Regards
Mansi
‎2009 Nov 30 6:49 PM
Thats right I ahve done it teh same way and everything worked fine and good , except for the text field. I would like the program to allow us to enter long texts arround 1000-1250 characters but I am unable to enter that long text in the selection screen as the block dosnet allow me to enter more than around 100 characters and that si what prints on the output form . I want it to allow me to enetr more text and print that in the output.
Thanks
‎2009 Dec 01 7:35 AM
‎2009 Dec 01 5:06 PM
Just the plain text would be enterd in teh selection screen and that is what is printing in the smartform output. I want this text that I am entering in the slection screen to be long enough to enter aropund 100 characters but as I declared it as tdline its allowing me to enter 132 characters only . If I enter char1024 then also it dosent allow me to go beyond 132 characters, I want this to it possible to enter very long texts and that will print on my smartform.
Tahnks