cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORM CODE

Former Member
0 Kudos

Hi all, I've never done sartor till now. can any of you send me the code as to how to start with smartforms in real time scenarious. i ve been following this way.

please suggest me whether my approch is correct.Is there any other special conditions that are to be followed while coding in se38. if possible can any one of u send me the code for any bussiness scenario which would be helpful for me to understand the rules to be folowed.

REPORT zsform .

TABLES : mara,marc,mard.

DATA : it_mara TYPE STANDARD TABLE OF mara WITH HEADER LINE.

DATA : f_name TYPE rs38l_fnam.

SELECT-OPTIONS : p_matnr1 FOR mara-matnr.

SELECT * FROM mara INTO TABLE it_mara WHERE matnr IN p_matnr1.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSFORM'

IMPORTING

fm_name = f_name.

CALL FUNCTION '/1BCDWB/SF00000165'

TABLES

it_mara1 = it_mara.

CLEAR it_mara.

Thanks in advance.....

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi..u r correct in every aspect..

remember one thing..if u want the data of only few fields in MARA,

u need to create a <b>structure and table type</b> with ur own fields in SE11 and then write select query to pass data into that itab.

In smartform u need to mention this table type inorder to import this itab.

former_member632991
Active Contributor
0 Kudos

Hi,

Ur approach is almost correct.

but instead or harcoding the FM name give f_name which has been generated from 'SSF_FUNCTION_MODULE_NAME'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSFORM'

IMPORTING

fm_name = f_name.

instead of

<b>CALL FUNCTION '/1BCDWB/SF00000165'</b>TABLES

it_mara1 = it_mara.

CLEAR it_mara.

use this

<b>CALL FUNCTION f_name</b>

TABLES

it_mara1 = it_mara.

CLEAR it_mara.

now design ur smartform and proceed.

Hope it helps.

Regards,

Sonika

Former Member
0 Kudos
Former Member
0 Kudos

Hi Naveen,

Thankyou very much for your help, this was really helpful for me. I am now confident to work in smartforms. As these are the basics in smartforms can you give me any links or any info to know the advanced features like barcodes, standard text and so on........

Thank you very much for your effort.