Application Development 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: 

Smartform related question-URGENT

abdulazeez12
Active Contributor
0 Kudos

Hii all,

I am working on cheque printing in FI module. I have a standard program for that. For printing the cheque, it uses a smartform. I want to know which Smartform it is using in the program. The program uses one FM, SSF_FUNCTION_MODULE_NAME and retrives a FM name, but I need the smartform from which this FM is obtained.How to find it out?

Thanks,

Abdul

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Abdul,

You can look at the parameter that is being passed to the function SSF_FUNCTION_MODULE_NAME. The form name will be passed in there.

Regards,

Ravi

Note : Please close the thread if this solves the issue

9 REPLIES 9

Former Member
0 Kudos

HI,

You can try this.

Go to the table TNAPR and give the program name and check the smartform associated to it.

Can you please tell me what is the standard program that you are using for the cheque printing in FI?

Thanks,

Rashmi.

Message was edited by: Rashmi Joshi

0 Kudos

Hii rashmi,

Thanks for your prompt response.

I am not using the standard program for cheque printing. Actually, I had this program for cheque printing developed by someone else. I am unable to find out the smartform name using the table TNAPR entries. Do we have any other way?

The following is the code for cheque printing iam using..

DATA: B_TYPE TYPE CHAR1,

C_TYPE TYPE CHAR1,

FIRST TYPE CHAR1.

DATA: retcode LIKE sy-subrc,

CHK TYPE CHAR1.

DATA : g_gsber LIKE bseg-gsber,

C_kunnr LIKE bseg-kunnr,

C_lifnr LIKE bseg-lifnr.

DATA DOWN_MODULE_NAME TYPE RS38L_FNAM.

DATA CLEAR_MODULE_NAME TYPE RS38L_FNAM.

DATA FUNC_MODULE_NAME TYPE RS38L_FNAM.

DATA OUTPUT_OPTIONS TYPE SSFCOMPOP.

DATA CONTROL_PARAMETERS TYPE SSFCTRLOP.

CONTROL_PARAMETERS-PREVIEW = 'X'.

CONTROL_PARAMETERS-NO_DIALOG = ''.

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

  • Internal Tables *

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

DATA: I_PAYR like PAYR OCCURS 0 WITH HEADER LINE.

DATA: X_PAYR like PAYR OCCURS 0 WITH HEADER LINE.

DATA: I_PAYR_PRC like PAYR OCCURS 0 WITH HEADER LINE.

DATA: i_BKPF like bkpf OCCURS 0 WITH HEADER LINE.

DATA: i_BSEG like bseg OCCURS 0 WITH HEADER LINE.

DATA: i_BSAK like bsak OCCURS 0 WITH HEADER LINE.

DATA: i_bsas like bsas OCCURS 0 WITH HEADER LINE.

DATA: wa_bseg like bseg OCCURS 0 WITH HEADER LINE.

data: g_augbl like bseg-augbl,

g_AUGDT like bseg-AUGDT,

g_lifnr like payr-lifnr,

g_kunnr like payr-kunnr,

g_strgb like payr-strgb,

g_REBZG like bseg-REBZG,

g_REBZJ like bseg-REBZJ,

g_REBZZ like bseg-REBZZ.

DATA WA_PAYR TYPE PAYR.

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

  • Selection Screen

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

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

PARAMETERS: P_HBKID like PAYR-HBKID OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN SKIP 1.

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

SELECT-OPTIONS: S_ZALDT FOR PAYR-ZALDT.

SELECT-OPTIONS: S_CHECT FOR PAYR-CHECT.

SELECT-OPTIONS: S_BELNR FOR PAYR-VBLNR.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN SKIP 1.

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

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

  • PAYMENT ADVICE

PARAMETERS: X_P RADIOBUTTON GROUP grp.

SELECTION-SCREEN COMMENT (50) text-102.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

  • CHEQUE

PARAMETERS: X_C RADIOBUTTON GROUP grp.

SELECTION-SCREEN COMMENT (50) text-100.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

  • VOUCHER

PARAMETERS: X_V RADIOBUTTON GROUP grp.

SELECTION-SCREEN COMMENT (50) text-101.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

  • VOUCHER - WITHOUT CLEAR ITEM

PARAMETERS: X_VNC RADIOBUTTON GROUP grp.

SELECTION-SCREEN COMMENT (50) text-103.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

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

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

*ICICI

PARAMETERS: R_ICICI RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (50) text-005.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

*HDFC(781)

PARAMETERS: R_H781 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (50) text-006.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

*HDFC(703)

PARAMETERS: R_H703 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (50) text-009.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

*SBI

PARAMETERS: R_SBI RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (50) text-007.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

*CORPORATION

PARAMETERS: R_CORPO RADIOBUTTON GROUP grp1.

SELECTION-SCREEN COMMENT (50) text-008.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK 1.

*Initialization.

INCLUDE Z_VOUCHER.

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

  • At selection-screen

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

AT selection-screen.

select single * from PAYR

where ZBUKR = '1000'

and HBKID = P_HBKID

and ZALDT IN S_ZALDT

and VBLNR IN S_BELNR.

if sy-subrc <> 0.

message 'Documents Not Found' TYPE 'E'.

endif.

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

  • START-OF-SELECTION

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

start-of-selection.

IF X_P = 'X'.

PERFORM PAYMENT_ADVICE.

ELSEIF X_C = 'X'.

PERFORM CHEQUE_PRINTING.

ELSEIF X_V = 'X' OR X_VNC = 'X'.

PERFORM VOUCHER_PRINTING.

ENDIF.

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

&----


*& Form CHEQUE_PRINTING

&----


form CHEQUE_PRINTING .

IF R_ICICI = 'X'.

b_TYPE = 'I'.

ELSEIF R_H781 = 'X'.

b_TYPE = 'H'.

ELSEIF R_H703 = 'X'.

b_TYPE = 'D'.

ELSEIF R_SBI = 'X'.

b_TYPE = 'S'.

ELSEIF R_CORPO = 'X'.

b_TYPE = 'C'.

ENDIF.

select * into table I_PAYR_PRC

from PAYR

where ZBUKR = '1000'

and HBKID = P_HBKID

and CHECT IN S_CHECT

and ZALDT IN S_ZALDT

and VBLNR IN S_BELNR.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'Z_CHEQUE_LOOSE'

IMPORTING

FM_NAME = FUNC_MODULE_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

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

SORT I_PAYR_PRC AS TEXT BY CHECT.

LOOP AT I_PAYR_PRC INTO WA_PAYR.

AT FIRST.

CONTROL_PARAMETERS-NO_CLOSE = 'X'.

ENDAT.

AT LAST.

CONTROL_PARAMETERS-NO_CLOSE = SPACE.

ENDAT.

CLEAR i_payr.

select * into table i_payr

from PAYR

where GJAHR = WA_PAYR-GJAHR

and HBKID = WA_PAYR-HBKID

and CHECT = WA_PAYR-CHECT

and ZALDT = WA_PAYR-ZALDT

and VBLNR = WA_PAYR-VBLNR.

CALL FUNCTION FUNC_MODULE_NAME

EXPORTING

CONTROL_PARAMETERS = CONTROL_PARAMETERS

USER_SETTINGS = SPACE

b_type = b_type

tables

i_payr = i_payr

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

CONTROL_PARAMETERS-NO_OPEN = 'X'.

IF sy-subrc <> 0.

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

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

ENDIF.

endloop.

endform. " CHEQUE_PRINTING

*&----


Any replies??

Thanks,

Azeez

Former Member
0 Kudos

Abdul,

You can look at the parameter that is being passed to the function SSF_FUNCTION_MODULE_NAME. The form name will be passed in there.

Regards,

Ravi

Note : Please close the thread if this solves the issue

0 Kudos

Z_CHEQUE_LOOSE is your Form Name.

Regards,

Ravi

Note :Please mark all the helpful answers and close the thread

0 Kudos

Hi,

Z_CHEQUE_LOOSE is your form name.

Thanks,

Rashmi.

0 Kudos

Hii

I am unable to find the Form name in either se71 or smartforms, the name "Z_CHEQUE_LOOSE".

0 Kudos

Abdul,

The SMART Form has to be that Z_CHEQUE_LOOSE as that is what is being passed to SSF_FUNCTION_MODULE_NAME.

Are you sure that the SMART Form still works and its NOT deleted. Can you execute the program and see if it works?

Regards,

Ravi

0 Kudos

Hii All,

I found the solution. The smartform Z_CHEQUE_LOOSE is present. thanks to all of you.

Abdul

Former Member
0 Kudos

Hi Abdul.

Try debugging your program and set a break-point after SSF_FUNCTION_MODULE_NAME.

Check if sy-subrc is 0 after that.

If really the form does not exist, you should get sy-subrc = 1.

Regds.

Samant