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

help

Former Member
0 Likes
507

Hi All,

Giving below the report. I have careted one smart form and created one report, but report is only fetching the form but not showing the data in the form. So plz check my report and suggest me the solution.

&----


*& Report ZFI_FORM_REPORT

*&

&----


*&

*&

&----


REPORT ZFI_FORM_REPORT.

Tables: bseg, bkpf.

DATA: itab LIKE ZFI_FORM_PRINTING_STRUCTURE OCCURS 0 WITH HEADER LINE.

DATA: fm_name TYPE rs38l_fnam.

**************************************************************************

  • Selection Screen

**************************************************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

select-options : p_belnr for bseg-belnr,

b_bukrs for bseg-bukrs OBLIGATORY DEFAULT '1000',

G_gjahr for bseg-gjahr.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: Customer RADIOBUTTON GROUP g1,

vendor RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b2.

*******************************************************************

  • F4 Help

******************************************************************

at selection-screen on value-request for p_belnr-low.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'FIELD'

dynprofield = 'p_belnr'

dynpprog = sy-cprog

dynpnr = sy-dynnr

value_org = 'S'

tables

value_tab = itab.

******************************************************************

  • Start-of-selection

******************************************************************

START-OF-SELECTION.

  • SELECT

  • a~SGTXT

  • a~HKONT

  • a~GSBER

  • a~KOSTL

  • a~WRBTR

  • a~BELNR

  • a~EBELP

  • a~BUKRS

  • a~GJAHR

  • a~LIFNR

  • a~KUNNR

  • b~BLDAT

  • b~XBLNR

    • lfa1~name1

    • INTO CORRESPONDING FIELDS OF table it_table

  • INTO (itab-SGTXT, itab-HKONT, itab-GSBER, itab-KOSTL, itab-WRBTR,

  • itab-BELNR, itab-EBELP, itab-BUKRS, itab-GJAHR, itab-LIFNR,

  • itab-KUNNR, itab-BLDAT, itab-XBLNR)

  • FROM ( bseg AS a INNER JOIN bkpf AS b

  • ON abelnr = bbelnr and

  • abukrs = bbukrs and

  • agjahr = bgjahr )

    • INNER JOIN lfa1 ON

    • blifnr = lfa1lifnr )

*

  • WHERE abukrs = b_bukrs AND abelnr = p_belnr AND a~gjahr = G_gjahr.

*

  • append itab.

  • endselect.

*

  • IF sy-subrc <> 0.

    • MESSAGE s000(zmess_cash_receipt).

    • ELSE.

    • PERFORM display_alv_report.

  • ENDIF.

*

*END-OF-SELECTION.

*

*

    • bblart IN ('KR','RE') AND ahkont IN

    • s_hkont AND abudat IN s_budat AND abschl IN s_bschl.

**

SELECT * FROM bseg INTO CORRESPONDING FIELDS OF itab

WHERE belnr = p_belnr

and bukrs = b_bukrs

and gjahr = g_gjahr.

  • MOVE-CORRESPONDING bseg TO itab.

append itab.

endselect.

select * from bkpf INTO CORRESPONDING FIELDS OF itab

WHERE belnr = p_belnr

and bukrs = b_bukrs

and gjahr = g_gjahr.

  • MOVE-CORRESPONDING bkpf TO itab.

append itab.

endselect.

PERFORM display_smartform.

&----


*& Form display_smartform

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM display_smartform.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZFI_FORM_PRINTING'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

WRITE:/ 'ERROR 1'.

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

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

ENDIF.

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'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

ITAB = 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.

ENDFORM. "display_SMARTFORM

1 ACCEPTED SOLUTION
Read only

former_member198270
Active Contributor
0 Likes
489

Hi Abhay,

check if you are taking work area for every Internal Table in Smartform or not .

just have to drag and drop that work area field into the position you want to display

<i>Reward Points if it helps solves query .</i>

Regards,

Amber S

3 REPLIES 3
Read only

former_member198270
Active Contributor
0 Likes
490

Hi Abhay,

check if you are taking work area for every Internal Table in Smartform or not .

just have to drag and drop that work area field into the position you want to display

<i>Reward Points if it helps solves query .</i>

Regards,

Amber S

Read only

0 Likes
489

ya i have done that.

Read only

Former Member
0 Likes
489

Hi Abhay,

First Check whether u internal table itab is populating correctly or not.

Under program lines in smartform write statement : break-point.

It will take u in debugging mode.

check the table u r passing in SF is having valid data or not.

Check ur windows sizes also.If data exceeds the window it will not print.

Reward points if helpful.

Regards,

Hemant