Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating an editable smartform program

Former Member
0 Likes
1,480

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,197
  • 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

10 REPLIES 10
Read only

Former Member
0 Likes
1,197

Any suggestions please.

Thanks

Read only

0 Likes
1,197

Patience please Aarav. The people here have other things to do.

Rob

Read only

Former Member
0 Likes
1,197

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

Read only

Former Member
0 Likes
1,197

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

Read only

p604431
Active Participant
0 Likes
1,197

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.

Read only

Former Member
0 Likes
1,198
  • 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

Read only

Former Member
0 Likes
1,197

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

Read only

0 Likes
1,197

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

Read only

0 Likes
1,197

what text exactly do want to print on the smartform?

Read only

0 Likes
1,197

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