cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms

Former Member
0 Kudos

Hi

I am displaying data in smartforms. Here i am using 2 tables like vbak and vbap.

Here i want vbeln,vbtyp,matnr,posnr,meins fields, i used for all entries. but i didn't get correct output.

Please tell me the total process.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

select * from vbak into table itab_vbak where vbeln in s_vbeln.

if sy-subrc eq 0.

select * from vbap into table itab_vbap for all entries in itab_vbak where vbeln eq itab_vbap-vbeln.

endif.

loop at itab_vbap.

read itab_vbak into wa_vbak with key vbeln = itab_vbap-vbeln.

if subrc eq 0.

fill output table.

endif.

append outputtable.

endloop.

display outputtable in smart form.

SF_example_01,

SF_example_02

SF_example_03

example programs and smartforms in any sap system to display tables data.

Edited by: S.r.v.r.Kumar on Jun 17, 2008 4:11 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Durga ,

Write a program where you extract these fields passing to a internal table. then call following function module see your data.

data : v_function type rs38l_fnam .

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = tnapr-sform

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = v_FUNCTION

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.

CALL FUNCTION v_FUNCTION

EXPORTING

USER_SETTINGS = space

TABLES

I_ITAB = i_itab

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.

In Smart forms

You give your respective internal table name in form interface->tables assingn it to structure.

You then give work areas in Global definitions.

Loop it around the respective table. for this right click in your table main area ->flow logic->loop.

Inside each cell jus give text elemnt add the field names

hope this will help u

Regards

Swetha

Edited by: Swetha on Jun 17, 2008 12:36 PM

former_member181995
Active Contributor
0 Kudos

Sri,

Welcome to SDN!

With duplicated rows in the resulting set, the addition FOR ALL ENTRIES has the same effect as if addition DISTINCT were specified in the definition of the selection quantity. Unlike DISTINCT, the rows are not deleted from the database system but are deleted on the application server from the resulting set.

dont forget reward.

Amit.

Former Member
0 Kudos

Hi Amit

Here i am getting vbap tables data only. I want to retrive vbak and vbap 2 tables data. Here i used for all entries.

Thanks