Printing Dunning Letters using Smartforms

Hi all,
I have a requirement wherein I need to print dunning letters using smartforms; the dunning data are extracted in program SAPF150D2;I modified the subroutine OFI_DUN_ACT to call function module FI_PRINT_DUNNING_NOTICE_SMARTF.
Now I need to extract the dunning data in program SAPF150D2 to be imported to my new form using GET_SF_DUNN_DATA, my question is where do I code the calling of FM GET_SFG_DUNN_DATA? I'm a little bit confused on the step by step process of the dunning data extraction to printing of the form... Thanks...

In the INITIALIZATION of the Smartforms, after the call to  GET_SF_DUNN_DATA, you have a many informations back, of which the record of MHNK and an internal table of MHND, which you can use to select other informations from database.
So fill or enrich your own internal table in the initialization.
I enclose thereafter a sample to help you
* Load data
  CALL FUNCTION 'GET_SF_DUNN_DATA'
       EXPORTING
            is_sfparam          = is_sfparam
       IMPORTING
            es_mhnk             = mhnk
            es_t001             = t001
            es_knb5             = knb5
            es_lfb5             = lfb5
            es_t047             = t047
            es_t047c            = t047c
            es_t047i            = t047i
            es_t056z            = t056z
            es_f150d            = f150d
            es_fsabe            = fsabe
            es_adrnr            = adrnr
            es_uadrnr           = uadrnr
            es_adrs             = adrs
            es_uadrs            = uadrs
            es_t047b            = t047b
            eb_testprint        = testprint
            e_langu             = langu
            e_lang2             = lang2
            es_f150d_esr        = f150d_esr
            es_paymi            = paymi
            es_paymo            = paymo
       TABLES
            t_mhnd              = th_mhnd
       EXCEPTIONS
            no_parameters_found = 1
            OTHERS              = 2.
IF sy-subrc <> 0.
  sy-msgid = 'FM'.
  sy-msgty = 'E'.
  sy-msgno = 461.
  RAISE others.
ENDIF.
h_t040a-text1 = space.
show_interest = space.
LOOP AT th_mhnd INTO mhnd WHERE xzins = ' '.
  show_interest = 'X'.
  EXIT.
ENDLOOP.
* Load user information
DATA: usr21 LIKE usr21, addr3_sel LIKE addr3_sel.
CLEAR: usr21, addr3_sel, addr3_val, adr6.
* Charger fiche profil
SELECT SINGLE * FROM usr21 WHERE bname = sy-uname.
* Récupérer l'adresse
MOVE-CORRESPONDING usr21 TO addr3_sel.
CALL FUNCTION 'ADDR_PERS_COMP_GET'
     EXPORTING
          address_pers_in_comp_selection = addr3_sel
     IMPORTING
          address_pers_in_comp_value     = addr3_val
     EXCEPTIONS
          OTHERS                         = 1.
* load SMTP address
CLEAR adr6.
SELECT SINGLE * FROM adr6
  WHERE addrnumber = usr21-addrnumber
    AND persnumber = usr21-persnumber.
* date format
SET COUNTRY adrs-land1.
* Group similar posts
DATA: xbseg TYPE bseg,
      xbkpf TYPE bkpf,
      xpost TYPE th_outtab.
REFRESH: t_post, t_cumul_waers.
LOOP AT th_mhnd INTO mhnd.
* Select lines to use
  IF mhnk-gmvdt IS INITIAL.
    IF mhnd-xzalb <> space OR mhnd-mansp <> space.
      CONTINUE.
    ELSEIF t047b-xpost NE 'X' AND mhnd-xfael <> 'X'.
      CONTINUE.
    ENDIF.
  ENDIF.
* Map data
  CLEAR xpost.
  MOVE-CORRESPONDING mhnd TO xpost.
* Load text from bseg
  SELECT SINGLE sgtxt INTO xpost-sgtxt FROM bseg
    WHERE bukrs EQ mhnd-bbukrs AND belnr EQ mhnd-belnr
      AND gjahr EQ mhnd-gjahr  AND buzei EQ mhnd-buzei.
  PERFORM edit_text CHANGING xpost-zuonr mhnd-xblnr xpost-sgtxt.
* if "Payment difference" get the date of original document
  IF mhnd-bschl = '06'.
    SELECT SINGLE bldat INTO xpost-bldat
      FROM bkpf
      WHERE bukrs = mhnd-bukrs
        AND belnr = mhnd-rebzg
        AND gjahr = mhnd-rebzj.
  ENDIF.
* Collect posts to print
  COLLECT xpost INTO t_post.
* Collect amount per currency
  MOVE-CORRESPONDING xpost TO cumul.
  COLLECT cumul INTO t_cumul_waers.
ENDLOOP.
* Load customer information
SELECT SINGLE * FROM kna1 INTO kna1
  WHERE kunnr = mhnk-kunnr.
SELECT SINGLE * FROM knb1 INTO knb1
  WHERE bukrs = mhnk-bukrs
    AND kunnr = mhnk-kunnr.
* Convert date to text
PERFORM convert_date USING control_parameters-langu mhnk-laufd
  CHANGING text_date.
PERFORM convert_date USING control_parameters-langu mhnk-prndt_before
  CHANGING text_prev.
PERFORM convert_date USING control_parameters-langu mhnk-grdat
  CHANGING text_extr.
Regards

Similar Messages

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • How to Print Employee Photo using Smartform

    Dear All,
    I have requirement to print Employee photo using Smartform.
    Here I want to give breif backgorund to uploading employee image procedure,we are uploading employee Image using transaction code OAOH by providing Business Object PREL and Document Type HRICOLFOTO. Click on create button on second screen by providing employee Code XXXXXXX and infotype 0002  after click on enter button system ask path for uploading image file.After storing image we can see the employee image by using transaction code PA30 after passing employee code.
    These employee image  I want to print in Smartform layout.If any body have done this type of the requirement.Pl.explain me .
    Thanks ,
    Regards

    Hi ABAP Programmer,
    Refer this link
    i  want to retrieve a photo image of an Employee to display in smartforms
    Regards,
    Sravanthi

  • Dunning letters with smartforms

    Hi everyone,
    I want to use the standard smartform F150_DUNN_SF to create dunning letters but I can't select it in SPRO > FI accounting >... > Dunning > Print
    I can only select SAPscripts.
    I've already done the note which consists in changing the FM FI_PRINT_DUNNING_NOTICE to FI_PRINT_DUNNING_NOTICE_SMARTF with FIBF transaction. Nothing happened. There's still no way to select smartforms...
    Does anyone know how to manage it ?
    Thanks,
    Regards.

    Thanks for your answer
    I have begin to assign print program for dunning notice in the transaction FIBF.
    On the SAP Business Framework: Business Transaction Events screen, from the menu bar choose Settings -> P/S function modules -> u2026 of an SAP appl.
    In the Function module box next to FIFI, I have enter the print program FI_PRINT_DUNNING_NOTICE_SMARTF.
    and I have save the changes.
    In the transaction FBMP. Dunning Procedure : Dunning texts
    when i do display for for ZF150_DUNN_SF.
    I have the message : Form ZF150_DUNN_SF language EN is not available in client 120
    Message no. TD131.
    I have see OB96 but I have a problem with the creation for my driver program.
    I use the smartform F150_DUNN_SF.
    I create a copy : ZF150_DUNN_SF.
    I create a driver program :
    REPORT  ZCALL_ZF150_DUNN_SF.
    * To call a smart form, we would need to call the function module that
    * is generated.
    * Calling the generated function module directly is not an efficient
    * method. For efficient method, click here.
    CALL FUNCTION '/1BCDWB/SF00000018'
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        is_sfparam                 =
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    *   ET_FIMSG                   =
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    *   OTHERS                     = 6
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    But I have a problem with the parameter : S_SFPARAM ( TYPE SFPARAM).
    I don't know what is this parameter.
    Thanks.
    Edited by: Spawn rad on Jun 23, 2008 4:18 PM

  • Regarding printing word file using smartforms

    Hi SAP Gurus,
    My requirement is as follows,
    I need to print an xls file or a word file from pc using smartforms. ie, uploading into internal table convert to smartforms format and print.
    Please suggest.
    Thanks & Regards,
    Pavan.

    Hi,
    Please find the below link
    http://help.sap.com/saphelp_47x200/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    Regards
    Haritha

  • Toshiba printer B-852 using Smartforms

    Hi
    Anybody have tried to install a Toshiba Tec Label printer (mine is B-852) into SAP without the SAPLpd ?
    I would like to create my printer into SPAD using a specific drivers for TEC like I have already done with Zebra. But I'm unable to find any topic on this.
    Thanks
    Fred

    check this....
    h71028.www7.hp.com/enterprise/cache/37011-0-0-225-121.html
    help.sap.com/saphelp_nw04s/helpdata/en/9b/83e187e37c11d18e2b0000e83dd9fc/content.htm
    sap.ittoolbox.com/.../sap-r3-basis/i-am-not-able-to-install-printer-driver-on-sap-production-server-252889
    sap.ittoolbox.com/groups/technical-functional/sap-r3-basis/add-printers-drives-to-sap-827492
    How to install a printer?

  • Print Dunning Notice in Smartforms

    Hi All,
    I want to print a dunning notice in SAP Smartforms.
    I have changed the settings required in customizing for Financial Accounts,  Financial Accounting Global Settings -> Business Transaction Events changing the function module as FI_PRINT_DUNNING_NOTICE_SMARTF.
    Then I created a smartform copying standard form F150_DUNN_SF & assigned it to my Dunning Procedure.
    When this smartform is assigned a warning message was appeared saying "Form ZF150_DUNN_SF is not defined or is not active"
    After all these settings when I tried to print the dunning notice, the program is terminated giving following reason:
    Form ZF150_DUNN_SF language EN is not active and has no errors
    Can anybody tell me how to rectify this issue please?
    Thanks in Advance,
    Inoka.

    Hi,
    The message is a sapscript message (TD 422); the system doesn't use smart forms.
    In my system it works.
    My customizing is as following (under BTE / settings)
    PS/functions modules/... of a SAP Appl.:
       00001720    FI-FI FI_PRINT_DUNNING_NOTICE    (as standard)
    Products/... of a customer:
       ZDUNNING   xxxxxx                           X(active)
    PS/functions modules/... of a customer:
       00001720     ZDUNNING          FI-FI     PRINT_DUNNING_NOTICE_SF

  • Dunning Level 4 without printing dunning letters

    Hi,
    We need to have the dunning level updated in the customer master,  but does not want to generate the letters. It is for last dunning level 4.
    We want to process the letters outside SAP for this level 4.
    The F150 run is not updating the dunning level 4 if we have removed the form assignment to this level. What to do?
    Regds,
    Servesh

    Hi,
    Please note that the system updates the dunning levels in the customer master only when the printing of dunning letter is completed in F150. So printing the dunning letter is needed.
    However you can print with this printout and can divert the output to a dummy printer via BTE 00001040 u201CDUNNING: Determine output deviceu201D. So the letter will not get printed actually.
    Regards,
    Gaurav

  • BTE for print Dunning letters

    Hi
    How to find BTE for action when I press button preview form (Print) in transaction F150.

    Set up and save your dunning run.  Then go to SE30 and restart F150 and do the test print process.  That will get you close enough witha hitlist.  The dunning BTE's are well identified and documented in FIBF though.  You could just go there and review the printing BTE's.

  • Arabic Printing using Smartforms

    Hi Gurus,
    I am trying to print arabic text using smartforms. I have set MS Word as the text editor. Arabic text is coming up correctly in the editor (Arabic font, Right-to-Left). I  created a Arabic smartstyle using A_TRAD font (I also tried other arabic fonts available). Now when I try to print it on HP LasetJet printer, the arabic text is coming up as single characters rather than words and lines. Different Arabic characters are not joined together to form words, they are all single characters separate from each other. Whereas arabic text is coming up correctly in the MS Word editor. Any help would be highly appreciated!!
    [email protected]

    Hi There.. Greetings...
    I am having the same problem of printing Arabic text in the smartform. The arabic Text is printing in opposite direction as well.
    what is the solution for this?
    Please help me.
    Looking forward to hearing from u.
    Kind regards,
    shekher

  • Use Adobe forms for Dunning letters

    Dear All,
    We have a requirement to use dunning letters using Adobe Forms. I would like to know,
    1. Is there a way we can attach adobe forms for dunning letters.
    2. what could be the estimate do develop these letters using adobe forms.
    3. Could I get some guidelines on the approach.
    Thanks.

    Hi Jonathan,
    You're right, PDF is easier to use in comparison to SapScript.
    If the SapScript is in use at this time, you should have no worries with PDF, where you can even import the official format.
    Regards,
    Francois

  • Receivables Dunning Letters R12

    Hi,
    Does anybody know how to print dunning letters from Receivables in R12. We
    have no license for Advanced Collections, but I heard that's also possible to
    send dunning letters from receivables.
    Regards,
    Kaan

    Hello Bhanu,
    Is this dunning process has customized. If this is customized please check the end to end setup.
    Regards

  • Dunning Letters not printing Credit Memos

    Hi experts,
    I have created dunning letters to print from the dunning wizard but I have a problem.
    The credit notes (credit amounts) are grayed out in the Recommendation Report step and I can't tick / untick them.  Also, the Credit Notes do not appear on the dunning letters.
    Any idea what I can do please?
    Thanks,
    vankri

    Hi,
    Thnaks for your inputs.
    I can be able to generate the spool with the tab "Sample printout" on F150. Output seems to be fine in the spool but when i go for the tab "indiv. dunn.notice" then from there i am not able to take the printout of the same. Usually when user used to run from this tab, spool request automatically gets deleted after use and printout of the same used to come up.
    Status tab is showing like -
    Parameters were manintained.
    Dun.selection scheduled for  for 19.07.11   at 15:59:38
    Dun.selection is complete
    Dunning notice printed,job deleted.
    Samp.Printout scheduled for 19.07.11   at 16:24:16
    Samp.printout is complete.
    Also can you please tell me whether i can use program SAP F150D2 directly for the printing and also will it update against customer?.
    Thanks.
    Edited by: absap on Jul 20, 2011 3:36 PM

  • Dunning Letters printed twice for the each Dunning number.

    Hi,
    Dunning letters are printed twice with the same Invoice & Details and sent to the customer.
    could you please let me know why the Dunning letter has benn printed twice? We need to give change any Profile options on printer side or in Adv collections?
    Please suggest.
    Thanks & Regards,
    Bhanu prakash

    Hello Bhanu,
    Is this dunning process has customized. If this is customized please check the end to end setup.
    Regards

  • Dunning letters Option - Print/email

    Hello Frens
    Our Customer needs an option to either print or email dunning letters. Currently the settings which we have done checks if email id is present and then emails the letters, but now the requirement has changed.
    When F150 Transaction is run, is there any way in which we can prompt or choose if the dunning letter has to be printed or emailed?
    Can anyone give me some solution on this?
    Thanks in advance!
    Regards
    Preeti

    Hello,
    Please check the function module. You need to incorporate the logic to trigger the both. Meaning that though there is an email address in the customer master record, it should spool a copy to SP02. Please take help of ABAPer.
    Regards,
    Ravi

Maybe you are looking for

  • Heating issue

    My macbook seems to be getting extremely hot, at first I thought it was because it would be resting in my lap or on my bed however today in class it began to get really hot again and the fans were extremely loud while I was in a lecture hall. My comp

  • Question concerning WebService and certificates

    Hi, well i'd like to get data from a WebService. Scenario is RFC to WebService in SAP XI. Therefore i also have to use user&pw and a certificate key i got previously! So i created the receiver channel and now i am stuck. There is the option User Auth

  • Zen MX and recovery mode

    I can't find a way to boot the my Zen MX in recovery mode and can't find any info about that in the Creative site. The steps listed for the Zen (not MX9 did not work because the MX have not the power switch thus I can't hold down the play button and

  • Error on activating User Exit on EDI - SD

    Hello, In order to customized our EDI requirements for Incoming Sales Orders for one of our customers, we need to activate a User Exit (EXIT_SAPLEDI1_001 on enhacement ZSDIDOC). When doing this, all the standard Sales Order entry processes are blocke

  • MASS Hiring Action

    Dear As per the client requirement i have run a Hiring action for 100 employees every month. Instead of running a hiring action for each employee every time, is there any solution to run a hiring action for 100 employees at one single instance. We ha