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

Smartform simple doubt

Former Member
0 Likes
1,032

Hi,

Please tell me the place in smartform where I will write the field which I have fetched from SAP.

Do I need to give the value between &&, I mean &field_name&.

I have just created a page and a main window in it.

I just need few lines of text and a few fields from sap tables to come and sit here.

Please suggest.

Regards,

Ishaq.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,010

Hi,

First create internal table in form interface and write SELECT query in intialization in Global definations after that goto the window where u want to place

data right click on window choose option create->text <b>after that u will find '' symbol top u observe this carefully click on that '' symbol then it will display another screen inthat screen specify related field of internal table which u want to display</b>

Regards,

Sateesh.B.

13 REPLIES 13
Read only

amit_khare
Active Contributor
0 Likes
1,010

Include TEXT element and write in it.

Check the link to get hands-on on Smartforms -

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
1,010

Hi,

For a text to be displayed, u need to create the text element.

For this Right click on the MAIN Window and goto Create --> Text .

Double clcik on the text and then in General Attributes, write the field name to be displayed between & &.

Regards,

Himanshu

Read only

Former Member
0 Likes
1,010

Hi,

Read only

Former Member
0 Likes
1,010

HI Ishaq ...

You don't have to do that way (&fieldname&) like you did in SCRIT...

You just have to drag and drop the value in the window......

use the 2 FMs for passing from the driver program to SMARTFORM

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZTEST_PO1_BK'

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

MOVE NAST-OBJKY TO V_OBJKY.

CONDENSE V_OBJKY.

P_EBELN = V_OBJKY.

pass ur data in this FM from table parameters.

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'

IM_EBELN = P_EBELN

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

T_EKPA = T_EKPA

T_EKKO = T_EKKO

T_LFA1 = T_LFA1

T_EKPO = T_EKPO

T_A0031 = T_A0031

T_A003 = T_A003

T_KONP = T_KONP

T_J_1IMOVEND = T_J_1IMOVEND

T_J_1ISSIRAT = T_J_1ISSIRAT

T_J_1IMTCHID = T_J_1IMTCHID

T_J_1IEXCTAX = T_J_1IEXCTAX

T_SPELL = T_SPELL

T_EKET = T_EKET

T_TVZBT = T_TVZBT

T_THEAD = T_THEAD

T_TLINE = T_TLINE

T_KONV = T_KONV

T_EKET1 = T_EKET1

T_RC = T_RC

T_T005U = T_T005U

  • T_ADR6 = T_ADR6

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

Jayant

Read only

0 Likes
1,010

Jayant,

First tell me how do I call the FM in my Se38 Program. I will get the name only during runtime right.

Regards,

Ishaq.

Read only

0 Likes
1,010

Hi,

Use Function SSF_FUNCTION_MODULE_NAME to get the Function Name associated with the Smartform.

Regards,

Himanshu

Read only

Former Member
0 Likes
1,010

Hi,

u can give text directly where u have to print the window.

for filed u have to give &filed_name&. if u need any clarification revert me.

Reward points if useful.

regards,

sudheer.

Read only

Former Member
0 Likes
1,010

hi ishaq,

in the smart form, there will be a icon for insert, click on that and mention the field within & &

ex : &itab1-pernr&

With Regards,

S.Barani

Read only

Former Member
0 Likes
1,010

hi,

To write the Field...u need to right click on the window->create->Text

If u have declared the field in Global Declarations tab...or if it's an internal table and if u have declared ur internal table in the Tables tab of the Form Interface....then <b>Click On Form Fields button(next to Form Painter)</b>

u get a list...in that find ur field and drag and drop it into the TEXT u had created.

regards,

priya.

Read only

0 Likes
1,010

Priya,

I clicked on the Field List On/Off Button, And I can see the fields on the left hand side bottom. I can see the tables and the fields that I declared in the form Internace. Then I double clicked on the text element in the main window. But I am not able to drag and drop the same.

Is there any thing I am missing out.

Please suggest.

Thanks,

Ishaq.

Read only

0 Likes
1,010

HI,

Once u double clcik on the Text Element, Click on the field u want to insert in the Text and just drag it to the blank space provided in the General Attributes tab.

This will automatically insert the field between &'s.

Regards,

Himanshu

Read only

0 Likes
1,010

Thank you very much guys.

I clicked on the general attribute + button of the text element and typed the field name there and now it is picking.

Thanks you so much

Read only

Former Member
0 Likes
1,011

Hi,

First create internal table in form interface and write SELECT query in intialization in Global definations after that goto the window where u want to place

data right click on window choose option create->text <b>after that u will find '' symbol top u observe this carefully click on that '' symbol then it will display another screen inthat screen specify related field of internal table which u want to display</b>

Regards,

Sateesh.B.