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

smartforms and its internal table

Former Member
0 Likes
1,513

Hi All!

From the main program, I call the FM SSF_FUNCTION_MODULE_NAME

and later "call lf_fm_name" as below shown.

The generated FM name gets an "internal table" in the tables parameter.

And now how can I to treat now this internal table within smart forms?

Please can you sequential explain the treatment. How can I acces

these datas of this internal table in the smartforms

reagards

ilhan

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
 EXPORTING
    formname                 = lv_pick_formname
*       VARIANT                  = ' '
*       DIRECT_CALL              = ' '
  IMPORTING
    fm_name                  = lf_fm_name
   EXCEPTIONS
     no_form                  = 1
     no_function_module       = 2
     OTHERS                   = 3.

  IF sy-subrc <> 0.
    IF sy-subrc = 1.
      MESSAGE e061.
    ELSEIF sy-subrc = 2.
      MESSAGE e062.
    ELSEIF sy-subrc = 3.
      MESSAGE e063.
    ENDIF.
  ENDIF.

  CALL FUNCTION lf_fm_name
  ....
  ...
  ..
      TABLES    lt_ausgabe_data       = lt_ausgabe_data

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,365

The tables parameter that you pass in the driver program will be passed to the TAbles defined in the Form interface section of the smartform.

This table can be used in

either

1) TABLE element or

2) LOOP element

For example you can define a loop element inside a main window

and inside the loop element , a text element to print each line of the internal table.

This loop element will print multiple lines of data that is passed using the tables parameter.

As an example you can have a look at the sample driver program:SF_EXAMPLE_03 and form SF_EXAMPLE_03

Regards,

Ravi

11 REPLIES 11
Read only

Former Member
0 Likes
1,365

Define one internal table in FORM interface of ur smartforms as like lt_ausgabe_data.

So that all the data from program will come to this internal table.

This u can use in ur smartforms

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,365

Hi,

lt_ausgabe_data should be declared in smartform in form interface section under tables.

lt_ausgabe_data like <structure_name>

Struture_name should be defined in dictionary.

Check this link.It can help you.

https://wiki.sdn.sap.com/wiki/display/Snippets/Smartform-Howtoavoidthedialog+box

Read only

Former Member
0 Likes
1,365

Hi!

In SMARTFORMS - Global settings - Form interface. Here you can find/define all relevant parameters.

Regards

Tamá

Read only

Former Member
0 Likes
1,365

Hi,

You have pass the internal table through call lf_fm_name in print program.

In smartforms you just declare the table name in tables tab of definitions.

This will automatically give you the print program internal table values in your smartform.

Hope this will solve your problem.

Reward if helpful.

Read only

Former Member
0 Likes
1,366

The tables parameter that you pass in the driver program will be passed to the TAbles defined in the Form interface section of the smartform.

This table can be used in

either

1) TABLE element or

2) LOOP element

For example you can define a loop element inside a main window

and inside the loop element , a text element to print each line of the internal table.

This loop element will print multiple lines of data that is passed using the tables parameter.

As an example you can have a look at the sample driver program:SF_EXAMPLE_03 and form SF_EXAMPLE_03

Regards,

Ravi

Read only

Former Member
0 Likes
1,365

what ever you pass from program to smartforms you need to declare in

GLOBAL INTERFACE -> Import parameter.(in the driver program export parameter). make sure u use the same name in the SMARTFORM GLOBAL INTERFACE - > import parameter.

for more about smartforms go thru these link

for Smartforms material

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

How to trace smartform

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

check most imp link

http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html

step by step good ex link is....

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

Please check the tables TNAPR and TTXFP for Standard Smartforms.

See the note 595812: it explain how to download the preconfigured smartforms.

Detailed information can be accessed at the site:

http://service.sap.com/preconfiguredforms OR

http://service.sap.com/smb/development/preconfiguredforms.

To download preconfigured smartform package, please:

1. Go to http://service.sap.com/installations, select tab "download".

2. On the right hand side screen, locate navigation tree node

SAP Software Distribution Center->Download->Installations and Upgrades->

Entry by Application Group.

3. In the main window (right hand side), follow the path

SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED

SMART FORMS, you can find available preconfigured smartform versions.

regards,

Prabhu

reward if it is helpful

Read only

Former Member
Read only

Former Member
0 Likes
1,365

Hello Thank you very for so many replies.

Do I have to define additional internal table within my smartforms after I have had passed internal table "lt_ausgabe_data" to the generated

FM named CALL FUNCTION lf_fm_name.

Regards

Ilhan

Read only

0 Likes
1,365

Hi,

U have the values in ur internal table lt_ausgabe_data in ur Z program

Then Go to smartforms...

Form interface define lt_ausgabe_data same as like ur program internal table.

Then data will be passed o this internal table.

Then Goto Global definitions ...Create one workarea as like lt_ausgabe_data

like in global definitons gibve..

itab like VBAK

in global defins create workarea like WAtype VBAK..

an then create one table node or LOOP node or TEMPLATES node ...

there in <b>data tab give itab into wa.</b>

Under that create textelements node and use as &wa-vbln& &wa-AUAR& etc....

<b>reward if helpfull.</b>

Read only

Former Member
0 Likes
1,365

Hi Sumi

you wrote

Then Go to smartforms...

Form interface define lt_ausgabe_data same as like ur program internal table.

Then data will be passed o this internal table.

This exatcly the most important part.

define lt_ausgabe_data same as like ur program internal table

which tab strip here.

will be passed o this internal table.

which internal table ?? I haven' t an internal table yet .

reagrds

Ilhan

Read only

0 Likes
1,365

Then Go to smartforms...

Form interface define lt_ausgabe_data same as like ur program internal table.

Then data will be passed o this internal table.

This exatcly the most important part.

define lt_ausgabe_data same as like ur program internal table

which tab strip here.

<b>InForm interface

in Tables Tab Give the internal table

itab like vbak</b>

will be passed o this internal table.

which internal table ?? I haven' t an internal table yet .

<b>Now u have one internal table in forminterface.and u r passing the values from ur program.

<b>the data passed from ur program will be stored inthe internal table which u have declared in form interface.

To process this values in smartforms.u have top create one work area.

Global definitions Global data Tab create work area like

wa type vbak.</b>

Create LOOP node or tables node or template node.

there in DATA tab chck the internal table checkbox and itab into wa.

under this create one text elements and use &wa-vbeln&</b>

In ur program

CALL FUNCTION '/1BCDWB/SF00000009'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

v1 = 'From Program'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

tables

<b> itab = itab</b>

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

REWARD if HELPFULL.