Calculation of values in a dunning form (SAP Script)

Hi Experts!
I want to add values to a sum (dunning-amount + dunning-fee + interest) in a dunning form (SAP Script; Z150_DUNN_02).Therefore I'm using a subroutine (Z_FI_KX_DUNN_02_INTEREST) to summarize. Problem is the format of the output-field &Z_FAEBT&. It's not similar to field &MHNK-FAEBT& which was formerly printed (without calculation of interest and dunning-fees.
/:   DEFINE &Z_FAEHW& := &MHNK-FAEHW&                 
/:   DEFINE &Z_ZINHW& := &MHNK-ZINHW&                 
/:   DEFINE &Z_MHNGH& := &MHNK-MHNGH&                 
/:   DEFINE &Z_FAEBT& := &MHNK-FAEBT&                 
/:   PERFORM ZFAEBT IN PROGRAM Z_FI_KX_DUNN_02_INTEREST
/:   USING &Z_FAEHW&                                  
/:   USING &Z_ZINHW&                                  
/:   USING &Z_MHNGH&                                  
/:   CHANGING &Z_FAEBT&                               
/:   ENDPERFORM                                       
/:   ENDIF                                            
A3   &MHNK-WAERS& &Z_FAEBT(C)&       
It would be fine to get a hint how to format the field &Z_FAEBT& correctly. Must be done in the subroutine Z_FI_KX_DUNN_02_INTEREST by a special WRITE-command? Is it possible to add these values only in the form?
Thanks for support!
Regards, Bernd

hi!
I defined the field like you said! After moving this field to a numeric field to add the different amounts the
following error occurred:
Runtime errors         CONVT_NO_NUMBER           
Exception              CX_SY_CONVERSION_NO_NUMBER
Occurred on     16.06.2009 at   15:15:25  
Unable to interpret " 1.316,59" as a number.     
Definition:
FORM zfaebt TABLES in_par STRUCTURE itcsy
                   out_par STRUCTURE itcsy.
  TABLES: mhnk.
  DATA: z_faehw_num LIKE mhnk-faehw,
        z_zinhw_num LIKE mhnk-zinhw,
        z_mhngh_num LIKE mhnk-mhngh,
        z_faebt_num LIKE mhnk-faebt.
  DATA: z_faehw TYPE string,
        z_zinhw TYPE string,
        z_mhngh TYPE string,
        z_faebt TYPE string.
statement:
  READ TABLE in_par WITH KEY 'Z_FAEHW'.
  CHECK sy-subrc = 0.
  z_faehw = in_par-value.
  z_faehw_num = z_faehw.
I suppose a type-conflict.
Regard, Bernd

Similar Messages

  • How to assign modified forms (SAP scripts etc.,) to Dunning texts

    Hello, how do I assign forms (SAP scripts etc.,) to dunning texts according to no 5 above?
    I've copied the form f150_dunn_01 and modified it. Now I want to assign my modified form to dunning text. In txn fbmp I have created new procedure and when I clicked on Dunning texts it takes me to dunning text screen where I should be able to assign my modified form. But the screen is greyed out and not editable. Is there anything I'm missing or I've permission issue?
    Please help
    Regards
    Naz
    Most of the config for Dunning is done with TCode FBMP.
    Key Steps are :-
    1.     Define the dunning procedure or use the standard
    2.     Define the dunning levels (desired stages of reminder)
    3.     Define the dunning interval (frequency of reminder)
    4.     Line item grace periods & Min.days in arrears (acct) govern the criteria for picking items to be dunned along with Minimum amounts
    5.     Assign forms (SAP scritps etc.,) to dunning texts. Forms contain the contents of the reminder notice and the format of notice.
    6.     You can include the Sp GL Transactions as well.
    7.     Customer/Vendor Master Records needs to be updated with the Dunning
    8.     Procedure etc, Dunning tab in the master data
    9.     Use F150 to run.

    Hi Praveen,
    Ok let me go through the steps that I have done so for.
    1. New dunning procedure 004 been created in Txn FBMP
    2. Then by choosing the assigned dunning procedure 004, trying to update the form by selecting the company code and then Dunning text. But the screen is grayed out.
    Please pass me your email address then I will send you the screen shoots.
    Thanks
    Naz

  • Driver program for the Dunning letter SAP Script

    Hello All,
    Can someone please tell me how to find the "Driver program for the Dunning letter SAP Script". I checked the Transaction OB96 but I dont find any Dunning scripts here i.e., the standard Dunning letter SAP Script F150_DUNN_01.
    Is there any Transaction like NACE of logistics for FI module to find the Driver programs. My requirement is to find the Driver program for the Dunning letter SAP Script and have a new Driver program instead of the standard SAP given driver program. Example is in transaction NACE we can change the driver program for Invoice like from RVADIN01 to ZRVADIN01.
    Thanks and Regards,
    SNK.

    Yes you can, using FIBF, change the FM associated with event 1720 like when SapScript is replaced with SmartForms. Look at [Define Dunning Forms (with SAP Smart Forms)|http://help.sap.com/saphelp_46c/helpdata/es/7d/c7a0a535e1d311ba4d0800060d888b/content.htm] for reference.
    But notice
    - PRINT_DUNNING_NOTICE call many FM of the same FG which share the same global data area.
    - During following upgrades of your system you will have to manage a copy of standard.
    Regards,
    Raymond

  • Passing value from a program to sap script ?

    Hello Friends,
    While defining the header,footer or address window to assign a text we goto text element and assign it.
    Now is there any way where we can pass the value from the program.
    Eg : I want to pass the value for address from the abap editor to the address window in a sap script instead of assigning the address using the text element in sap script. Is it possible?
    Regards,
    Ranjith

    You can have subroutines in script.
    if you have any fields used to get address then using that fileds you can retrieve the address by defining subroutines in your form
    Reward points if useful.
    Regards,
    Nageswar

  • How to limit the number of rows in a smart form , sap script.

    Can anyone tell me how to limit the number of rows in the output of a sap script/smart form. I have tried "protect/endprotect" in sap script but have no idea of how to do in smart form. In sap script the only way it has happened is by reducing the size of the main window.

    Hi,
    In Smartform also, why dont you try reducing the size of the window if you want to limit the rows in it. Also if you are printing Line Items in a LOOP, you can write
    LOOP AT T_ITAB FROM 1 TO N in the LOOP Node if you know how many records exactly you want to display in 1 Page processing.
    regards,
    Mahesh

  • F110_PRENUM_CHCK Form(SAP SCRIPT)

    Hi,
    For the form F110_PRENUM_CHCK(SAP SCRIPT) Print Program is RFFOUS_C.What is the Check Amount Field in this Form and Direct Deposit Amount Field name in this Form and also needText Element names For this Fields.
    Thanks in Advance.

    Hi Madhavi,
    Thanks For your Reply.Suppose if it is a Direct Deposit(Not Check Amount).Then in which field the Direct Deposit amount is stored?

  • Quotation(VA22) - How to change form - sap script or smartforms ?

    Hallo,
    as defaults, by VA22 I can print the quotation by sapscript.
    I have to change form: I have to create a new smartforms instead sap script. in transaction V/30 I can set some parameters to change it.
    My question is: Where is the correct parametrs to entry ?
    (I entered the name of smartforms and a Z print program but I got an error message )
    Any idea ?
    Tks.

    Hi,
    I guess the terminology's causing some problems.  Here's what I think you need to do;
    In transaction V/30 select the Output Type then double-click on the folder 'Processing Routines'.  The columns are as follows;
    Medium - Print, email etc
    Program - Name of the print program
    FORM Routine - name of the subroutine in the print program that will be called
    Form - Name of the SAPscript (if used)
    PDF/Smartform Form - Name of the Smartform, or pdf form (if used)
    Type - If a Smartform or pdf form is specified, select from this drop-down which type it is.
    If you're getting an error when you enter your parameters, it would be useful if you told us what the error was.
    Regards,
    Nick

  • Form sap script

    i wnt to hard code in form as if flag is checked print delivery terms as CIP else
    value from program how to do it the coding is as below is it correct?
    /: iF &variable& = 'X'            ( ie checking on flag)
    <B>delivery terms:</>,, FIG    ( how to put this  as equal to hard code i want to print delivery terms FIG in the output ( what is the syntex for it)      
    /: ELSE
    <B>delivery terms:</>,,&vdkr-vbeln&  
    pls rectify the syntex if wrong should it be 'FIG' in quotes?
    arora

    answered

  • How to show excessive values in next page in SAP SCRIPT

    Hello,
    Please any one can help to show excessive values in next page .
    For example i want to show
    567
    5678
    789
    23456
    I want to show values 23456 in next page only.
    Can anyone please suggest me how to do so?
    Thanks and regards
    Mave

    Hi Swetlin,
    I have this format in the main window.
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    now when i am doing as you suggested
    the last texts are coming in the next page.
    What i want is to show overflow of numeric data in next page and the remaining last text should remain as it is in the first page only.
    i mean
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    and in the next page
    4567
    4568
    8790
    Thanks and regards
    Mave

  • Deleting a form (sap script) in non original languages

    Hi,
    I have copied a standard form into Z form (all languages).
    But now i want only original language, other languages of the form is not required.
    So please suggest how to delete those forms.
    Regards,
    Chinna

    Hi,
    Goto se71 and give the form name then goto utilities and copy from client.Then in that screen give the form name and there you find check box to copy only into original language.so that you can copy only into original language.
    Other wise if you already copied you have to delete each and evry form separatly.Better try to copy from client 000,so that it will override the existing form.
    Thanks,

  • Dunning Forms

    Hi,
    I am trying to set up dunning forms (sap script), I have copied the standard sap script with zname and add one more field in that. But when i am trying to print it, system checks the smartform instead of sap script and issues a message that ZFORM (smart form) is not available.
    Can any body suggest me how sap defferentiate between sap script & smartform for dunning. I would like to use sap script NOT the smartform.
    Please suggest howt o handle this situation.
    Thanks in advance,
    PK

    Hello,
    Please make sure that it has been activated.
    Some times we have also faced similar issue. In such cases, you do not have any other option EXCEPT depending on SMARTFORM. For ABAPer this may little difficult thing, but we have to with it.
    Regards,
    Ravi

  • How To Display Minus value in SAP SCript

    Hello Guys.
    I am working on a Script. My Problem is that For a fields BSAD-DMBTR.
    I have to show this fields value as minus or plus as per condition with fields
    <b>bsad-shkzg</b>. In my Internal table it's update as minus but when  I am calling  Write form with loop.  the value is not display with minus sign.
    How can I display value with minus sign in SAP script.
    Regards
    Swati,,

    Hello Guys..
    Thanks for Reply. But I am doing that thing already. My Internal table is updated with minus value. My Problem is not That.
    let's suppose.
    itab-name  =  'xyz'.
    itab-value   =   100.
    append itab.
    itab-name  =  'xyz1'.
    itab-value   =   -1 * 100.
    append itab.
    loop at itab.
    CALL FUNCTION 'WRITE_FORM'
        EXPORTING
            element                  = 'LINE'
            function                 = 'SET'
            type                     = 'BODY'
            window                   = 'MAIN'
          EXCEPTIONS
            element                  = 1
            function                 = 2
            type                     = 3
            unopened                 = 4
            unstarted                = 5
            window                   = 6
            bad_pageformat_for_print = 7
            spool_error              = 8
            codepage                 = 9
            OTHERS                   = 10.
        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.
    Now when value is printed in SAP Script both value is display as plus .I want to display secound value as minus.
    Please reply it's urgent.
    Thanks
    Swati....

  • Advantage of SAP Script over Smart forms

    Hi Friends,
    Can you please let me know some ten points on Advantages of SAP Scripts over Smart Forms.
    Thanks,
    Gokul

    Hi Gokul,
    Major Differences between smart form and Scripts are
    Multiple page formats are possible in smartforms which is not the case of SAP Scripts
    It is possible to have a smartform without a main window
    Labels cannot be created in smartforms.
    Routines can be written in smartforms tool.
    Smartforms generates a function module when activated
    Background graphics are possible in case of SMARTFORMS
    Assigning the font colours to the text are not possible in the case SMARTFORMS.
    Creating and maintaining SMARTFORMS requires half the time compared to SAP Scripts
    Smart Forms                                           SAP Scripts
    1)Form, Text Module, Styles are          Form, So10 are
    client independent                             client dependent
    2)In a form diff pages can have         In a form all pages should
    different page formats                      follow one page format
    3)Back ground picture is possible     Not Possible
    4)Maintenance cost is low                Heavy
    5)Web publishing is possible             Not Possible
      using XML
    rewards if helpful........................
    Regards,
    Maha.

  • How to find List of Z forms in sap script?

    Hi Could any one help me to trace out how could we find the List of z FORMS(sap script forms)  in sap system..
    For instance if  i put z* in smartforms and press f4 i will find list of customized forms where as
    when i did the same thing in sapscripts (se71) it will display a tree structure ...where its hard to trace out...waiting for your inputs!!
    Regards
    Sas

    Goto SE38
    & execute program RSTXFCAT.
    Enter Z* in FORM field.
    Best regards,
    Prashant
    Hi Viswa when i gone through above format i can see 6 output forms
    but when i see the same in TADIR with object name as FORM i can see 10 forms
    which 4 are extra but unable to get them in the sap script . when i am entering the names in form and using diaply button system is prompting as the form(those 4 FORMS ) are not existing?
    WHY SO any idea...im table even i didnt find any difference as such
    Regards
    Sas

  • Comma not seen in the amount value in SAp Script

    Hi,
    I am printing the folllowing values which contain amounts in SAP Script.
    <Z>Sum total,,,,,,&REGUD-SWRBT(13)&,,&REGUD-SWABZ(9)&,, &regud-swnet(13)&</>
    Both the values are printed as the following
    REGUD-SWRBT  = 20000,000.00
    regud-swnet         = 20000,000.00
    I want the same to be printed as below.
    (ie the comma seperator to be printed in the second set of 3 zeroes as well)
    REGUD-SWRBT  = 20,000,000.00
    regud-swnet         = 20,000,000.00
    Can any one suggest me please.
    Thanks !!
    Regards

    Hi Adarsh,
    Actually the problem here is that the field length of the field SWRBT is only 13 and the extra comma you want, can not be accommodated there.
    You will have to declare a variable of about 14-15 field length and then
    pass this value in it. Definitely the comma will appear.
    Hope this is Useful.
    Thanks,
    Daya.

Maybe you are looking for

  • How to use the cancel button in showInputDialog

    um how would i go with overriding the cancel button's deafult function in JOptionPane.showInputDialog? in my code: package alphaOne; * this program takes in a number and gets the factorial of that number import javax.swing.*; public class Factorial {

  • Best practices when it comes on online content creation

    I'm trying my luck since Google is not really providing me the results I'm looking for or I'm using the wrong word searches. Is there any information available that lets a novice like me to know when developing an online content, what are some of the

  • Sorting in EJB

    At my wits end. Currently I'm using CMP EJB-QL 2.0. I got a lot of problem sorting the return collection. whenever i insert this code into my Stateful ejb to perform the sorting, it always prompt error. Collections.sort(productList, new Comparator()

  • Remove itunes wi-fi sync

    How do you remove a comptuer from itunes wi-fi sync!!!! Please help this should not be that difficult.  It keeps asking for a password for a different apple account

  • Results Analysis on WIP

    Hi Guys, Do we carry out the Results Analysis to know the cost of the WIP at a particular point of time? What information does this Results Analysis yield and how do we use this information. Do we calculate the cost of WIP? And where do we settle the