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: 

Dunning Notice print/email using both Smartform and SAP-Script

Former Member
0 Kudos

Hello Gurus,

I have developed the Customized SAP Script (Copy of 150_DUNN_01) for Dunning NOtice to be send to Domestic Customer and

Cutomized Smartform (copy of F150_DUNN_SF) for Foreign Customer.

Now Issue is that when I assign the Customized script to SPRO setting and standrd setting for BTE '00001720' with function

module 'FI_PRINT_DUNNING_NOTICE', if I want to assign smartform to SPRO setting then I need to replace same FM with

'FI_PRINT_DUNNING_NOTICE_SMARTF'.

how it is possible to work with both SAP-Script and Smartforms for dunning Procedure.

Please gurus let me help for this solution...

Thanks in Advance,

Mahesh Sachani

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Why did you use two different tools to manage the form?

However, you can create your own Z_FM by copying the signature of one of two FM. Via FIBF attach it to the event 00001720.

In this FM call FI_PRINT_DUNNING_NOTICE_SMARTF or FI_PRINT_DUNNING_NOTICE by the value of I_MHNK-LAND1.

Regards,

Raymond

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos

Why did you use two different tools to manage the form?

However, you can create your own Z_FM by copying the signature of one of two FM. Via FIBF attach it to the event 00001720.

In this FM call FI_PRINT_DUNNING_NOTICE_SMARTF or FI_PRINT_DUNNING_NOTICE by the value of I_MHNK-LAND1.

Regards,

Raymond

0 Kudos

Hello Raymond,

Thanks for your answer, Actually For Domestic customer I am using SAP Script and when I have created another entry in

FIBF -> P/S Module -> of a SAP Application....Z_FI_PRINT_DUNNING_NOTICE, it is giving error call "An entry already Existswith same key".

If I remove FI-FI from Application Indicator it is allowing me ....

Now thing is that if I where I need to asssign the value of 'land1' please let me know I dont have any idea for that becasue I have just started my career in SAP...

Please Reply soon....

Thanks,

Mahesh Sachani

Edited by: MaheshSachani on Aug 26, 2011 10:26 AM

0 Kudos

First copy FI_PRINT_DUNNING_NOTICE into Z_FI_PRINT_DUNNING_NOTICE, only keep the parameter list in this new FM.

Now in the source tab, check value of I_MHNK-LAND1 and depending on value, call FM FI_PRINT_DUNNING_NOTICE or FI_PRINT_DUNNING_NOTICE_SMARTF with the same parameters you receive.

FUNCTION z_fi_print_dunning_notice.
*"--------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_MAHNV) LIKE  MAHNV STRUCTURE  MAHNV
*"     VALUE(I_F150V) LIKE  F150V STRUCTURE  F150V
*"     VALUE(I_MHNK) LIKE  MHNK STRUCTURE  MHNK
*"     VALUE(I_ITCPO) LIKE  ITCPO STRUCTURE  ITCPO
*"     VALUE(I_UPDATE) TYPE  C DEFAULT SPACE
*"     VALUE(I_MOUT) LIKE  BOOLE-BOOLE DEFAULT SPACE
*"     VALUE(I_OFI) LIKE  BOOLE-BOOLE DEFAULT 'X'
*"  TABLES
*"      T_MHND STRUCTURE  MHND
*"      T_FIMSG STRUCTURE  FIMSG
*"  CHANGING
*"     VALUE(E_COMREQ) LIKE  BOOLE-BOOLE
*"     VALUE(E_RETCODE) TYPE  C
*"--------------------------------------------------------------------
  DATA: fmname TYPE rs38l_fnam.
  CONSTANTS: c_ss VALUE 'FI_PRINT_DUNNING_NOTICE' TYPE rs38l_fnam,
             c_sf VALUE 'FI_PRINT_DUNNING_NOTICE_SMARTF' TYPE rs38l_fnam.

  IF i_mhnk-land1 = 'xx'. " your country (domestic)
    fmname = c_ss.
  ELSE.
    fmname = c_sf.
  ENDIF.

  CALL FUNCTION fmname
    EXPORTING
      i_mahnv   = i_mahnv
      i_f150v   = i_f150v
      i_mhnk    = i_mhnk
      i_itcpo   = i_itcpo
      i_update  = i_update
      i_mout    = i_mout
      i_ofi     = i_ofi
    TABLES
      t_mhnd    = t_mhnd
      t_fimsg   = t_fimsg
    CHANGING
      e_comreq  = e_comreq
      e_retcode = e_retcode.

ENDFUNCTION.

This Z_FM will replace the current FM in FIBF.

Regards,

Raymond