Function module to get customer balances

Hello , is there a FM to get customer balances?

hi Sooness,
  i am not sure but you can check with the BAPI:
BAPI_AR_ACC_ GETKEYDATEBALANC E
function module to get AR (customer balance).
  and also have a look in the link below:
http://www.sapbapi.com/bapi-list/
http://www.erpgenie.com/abap/functions.htm
With luck,
Pritam.

Similar Messages

  • Is there a Function module to get customer hierarchy data?

    Howdy,
    I'm writing a report where the user can, on the selection screen, enter a customer number or a hierarchy node and then the program has to get all the higher level nodes and  and lower level nodes for the selected Sales area.
    eg. for the following hierarchy:
    A
    ->B
    --|-> D
    --|-> E
    -> C
    ---|-> F
    ---|-> G
    if node b was selected it would pull back:
    KUNNR     HKUNNR
    A         blank
    B         A
    C         A
    D         B
    E         B
    F         C
    G         C
    Anyone know if there is a Function module that can do this?
    Thanks

    Hi Victoria,
    even i was using the same FM "RSNDI_SHIE_STRUCTURE_GET3"
    my code goes like this...
    i am passing hierarchy name and  node name...this is for cost element hierarchy.
    please check the code and tell if i am missing anything.
    o/p i am getting is all 0's.
    report ztest5.
    tables : ZREPCODMAP.
    data: itab type standard table of ZREPCODMAP with header line.
    TYPES: BEGIN OF STRUC,
             RESULT type RSSH_S_NODEBYNAMEWOL,
            ZREPCODMAP-REPDSELM,
            END OF STRUC.
    DATA: itab1 type standard table of struc with header line.
    data: w_hiesel like RSNDI_S_HIESEL.
    w_hiesel = '1000KES'.
    *data: w_nodebyname type RSNDI_T_NODENM.
    data: tab type standard table of RSNDI_S_HTAB with header line.
    data: lsubrc type SY-SUBRC.
    select * from ZREPCODMAP into table itab where PROFIT_CTR <> ' '.
    loop at itab.
    concatenate itab-CO_AREA itab-REPDSELM INTO itab1-RESULT.
    *write: itab1.
    break-point.
    CALL FUNCTION 'RSNDI_SHIE_STRUCTURE_GET3'
    EXPORTING
    I_S_HIEKEY =
    i_s_hiesel = w_hiesel
    i_s_subtreesel = itab1-result
    I_T_NODENAME =
    I_NO_NODENM_TABLE = w_flag
    IMPORTING
    E_S_HIEDIR =
    e_subrc = lsubrc
    TABLES
    E_T_HIEDIRT =
    e_t_hierstruc = tab.
    E_T_MHIERNODE =
    E_T_THIERNODE =
    E_T_HIERINTVL =
    E_T_NODENAMES = tab.
    E_T_NODEATTR =
    E_T_LEVEL =
    E_T_MESSAGE =
    write: tab.
    *write: lsubrc.
    endloop.
    Thanks & Regards,
    Vijaya

  • Function module to read customer balances for current fiscal year.

    Hi,
    Could anyone please tell me about the function module which would display the customer credit balances from the FD10n transaction code for teh current fiscal year. that means from july 2010 to july 2011.

    Hi,
    use the BAPI 'BAPI_AR_ACC_GETCURRENTBALANCE'
      CALL FUNCTION 'BAPI_AR_ACC_GETCURRENTBALANCE' "Closing balance of customer account in current fiscal year
      EXPORTING
        companycode =               " bapi3007_1-comp_code  Company code
        customer =                  " bapi3007_1-customer  Customer
      IMPORTING
        actual_balance =            " bapi3007_9    Carry forward balance and balance
        return =                    " bapireturn    Return Code
        .  "  BAPI_AR_ACC_GETCURRENTBALANCE
    This method provides a customer's balance for the current fiscal year.
    It displays both the balance of standard transactions and the total balance of standard transactions and all special general ledger transactions.
    Read the Documentation of the BAPI.
    Regards,
    Dhina..

  • Function module to get customer's  PO box address?

    Hello friends,
    I want to display customer address in my report.
    When we execute XD03 and enter any customer number, address details displays in various sections..like..
    Name, Search Terms, Street Address,PO box address and Communication.
    I need function module which gives me the details of "PO box address".
    Is there any function available in abap?
    Thanks
    RH

    Hello,
    You can use the BAPI: BAPI_CUSTOMER_GETDETAIL2. In the EXPORT parameter you have a structure for Customer Addr. (CUSTOMERADDRESS LIKE BAPICUSTOMER_04).
    The PO BOX is in BAPICUSTOMER_04-PO_BOX.
    Hope this helps.
    BR,
    Suhas

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • Standard Function modules to update customer partner

    Hi,
    Can anyone please suggest standard function modules to update customer partner functions?
    Was looking at Customer_insert, customer_update, CUSTOMER_UPDATE_SALES_AREA.
    I will have only the partner data in the customser sales view to get updated. I dont need the company data.
    Awaiting some insightful inputs please.
    Thanks,
    Satheesh

    FM and TABLES
    http://72.14.235.104/search?q=cache:71IXBMWcX_8J:reflexcontracts.co.uk/SAP_R3_QUICK_REF.xlsupdatetable+tse05&hl=en&ct=clnk&cd=1&gl=in
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful.........
    Minal

  • How to insert a code for a function module into a Customer Exit Variable?

    I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
    I need to get data in the column LW (Last Week) for both the key figures.
    In function module EXIT_SAPLRRS0_001 one of the functions I have is:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    I need to create a new variable to get values in the Last week column for different key figures and use function “'DATE_TO_PERIOD_CONVERT'” in that variable.
    Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
    In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
    Thank you.
    TR.

    Hi Wond,
    Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                EXPORTING
                  i_date         = ld_date
                  i_periv        = lc_periv
                IMPORTING
                  e_buper        = ln_poper
                  e_gjahr        = ln_bdatj
                EXCEPTIONS
                  input_false    = 1
                  t009_notfound  = 2
                  t009b_notfound = 3
                  OTHERS         = 4.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ELSE.
                lc_poper = ln_poper.
                CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
                wa_e_t_range-sign = 'I'.
                wa_e_t_range-opt = 'EQ'.
                APPEND wa_e_t_range TO e_t_range.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
    Thank you.
    Regards,
    TR.

  • Function Module Not Getting Activated

    Hi,
    We are using a customised function module which we are calling in a user exit. We would like to call this function module in update task in the user exit to populate data in a custom table.
    We have given the following parameters to the function module
    Import Parameters
    ITAB     LIKE     ZPRUNDAT
    Export Parameters
    l_subrc     TYPE     sy-subrc
    On the attributes tab of the function module, Update Module has been selected under processing type.
    When we try to activate this function module we get the following message
    EXPORTING parameters are not allowed in the update task.
    and the function module does not get activated. What should we change to get the function module activated?
    Mick

    Hi,
    Please try this....
    In function module
    In tables Section add this...
    RETURN TYPE BAPIRET2 and then activate.
    if its useful reward points

  • Storing the output of a function module into a custom table

    Hi Gurus,
    Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?

    hi,
    After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
    data :wa type ITAB_RESULT.
    call FM and get result it ITAB_RESULT
    loop at itab_result.
    move-corresponding itab_result to wa.
    insert wa to ZRESULT.
    endloop.
    Regards,
    Mansi.

  • Function module for getting Vendor Address details

    Hi,
    Im new to this group,and new to ABAP
    plz hep me out by solving ABAP Query...
    i want to generate a report for getting Vendor Details
    like Vendor address,Ph num and Email
    input fields are Company code,country key and Account Group.
    im Using Smart Forms for this..
    but im not getting the Exact Function module to get All Required Details..
    regards
    Smitha

    thanks for ur quick reply...
    SELECT SINGLE LIFNR
      FROM LFB1
      INTO V_LIFNR
      WHERE BUKRS EQ V_BUKRS.
      CALL FUNCTION 'VENDOR_READ'
        EXPORTING
          i_bukrs         = V_BUKRS
          i_lifnr         = V_LIFNR
        EXCEPTIONS
         NOT_FOUND       = 1
         OTHERS          = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    this is the code i have written...
    but my problem is there no table in the Function module....
    for Example...
    CALL FUNCTION 'QPAX_PLMKB_READ_FROM_PLKO'
        EXPORTING
          i_plnty            = 'Q'
          i_plnnr            = V_PLNNR
          I_PLNAL            = V_PLNAL
          i_sttag            = V_DATUV
       TABLES
        T_PLMKB_TAB        = IT_TAB
    i want the function modules with tables and proper input...

  • Function module for getting the open qty

    HI experts,
                      I have a PO quantity(EKPO_MENGE).against same PO and item item(EBELN and EBELP) if Goods receipt has happened (MSEG_ERFMG) then i need to calculate the open qty.and also by netting the open quantity if multiple GRs has done against the same PO and item.
    Can you suggest any function module to get this open PO quantity.

    Hello,
    Hope this link can help you.
    [Po Open Quantity;
    Thanks
    Jayant

  • ABAP - Function module to get the number of working days between 2 days

    Hi gentlemen,
    I have been asked to produce a report that gives the number of working days between 2 days, based on a calendar.
    I didn't find anything...
    Has any of you already written a function module to get this ?
    A great thanks in advance.
    Jacques Lagrif

    Hi ,
    you can try this ,
    when you require the number of working days between D1 and D2
    Total No of Days will be
    D2 - D1
    No of holidays between D1 and D2 , use the FM HOLIDAY_GET
    Pass the From date , to date , and the factory calendar to get the of Holidays
    Total no of days - Number of Holidays will your Working days
    Regards,
    Sathya

  • Function Module to get the Screen

    Hello All,
    Can anybody provide me a Function Module to get the Screen by giving Program Name and Screen Number.
    Thanks,

    Hello
      check FM  RS_IMPORT_DYNPRO
       CALL FUNCTION 'RS_IMPORT_DYNPRO'
          EXPORTING
            dylang = pmlang
            dyname = programname
            dynumb = screen
          IMPORTING
            header = header
          TABLES
            ftab   = ifields
            pltab  = iflowlogic.
    or you have to create join b/w table reposrc and tadir .
    Thanks
    Anirudh

  • Function module to get the details (WTGBTR) from table COEP

    Hi all,
    I have to select the data from COEP table based on OBJNR, KSTAR and KOKRS.I want  WTGBTR from COEP Table.
    Right now Iam using select query.But i want to use function module.
    Can any one please tell me is there any function module to get  WTGBTR from COEP table.
    Thanks.

    This'll work:
    SELECT objnr bukrs wtgbtr
      INTO CORRESPONDING FIELDS OF TABLE gt_coep
      FROM coep
      WHERE lednr = '00'                               "<========
        and kokrs = '1000'
        AND kstar IN ('0000810001' , '0000830001')
        AND objnr IN s_objnr
        AND bukrs IN s_bukrs.
    Rob

  • Function  module to get pernt by passinf objid and otype

    Hi,
    Help me to find any function module to get pernr by using objid and otype.or table name from which we can get pernr by passing objid and otype.
    thanks,
    satish.

    You are talking about on the OM side and obtain the perner via object P?
    You can through a few method. One is using evaluation path. There is a function module called HR_STRUC_GET which allow you to pass evaluation path to get the result.
    Using that, you could create a simple evaluation path from position (object s) to person (object p). The object ID of object P is your pernr.
    Unless you have central person functionality, that might no longer be the case.

Maybe you are looking for

  • Problem recording videos with Toshiba Camileo X-Sports

    Hi there, I recently just brought the Toshiba Camileo X-Sports so am fairly new to how the camera works. As the title suggests I am having some issues recording. Right I'll try and explain the best i can The reason I purchased this device was mainly

  • How to send E-mails using JSP

    I developed a system where users can login and check for updated information and documents. But the changes are made once or twice in a year. I want to send email after changing the documents. I stored email addresses in the DB. Now the question is h

  • Black Background Title Screen

    I am trying to create a black background title screen (with white titles). Suggestions on this board have indicated that I could drag the title bar before the clip begins and that the default color would be black (i.e., solving my problem). I have no

  • I'd like a kbd shortcut that mimics the green button in Mac OSX windows.

    I'm aware that I can assign a custom shortcut to this very function in OSX's System Preferences, but such a shortcut won't work in Firefox, even after restarting it. So is there a Firefox keyboard shortcut that maximizes/minimizes a window the way th

  • Captivate 7 Widget Copy/Pasting Text Creates Double Text

    I'm using Captivate 7 on a Mac OS X.9 machine and every time we use a Insert>Interaction and have to paste text from either a Word doc or plain text document the text double pastes into the Interaction Widget. This causes issues because its difficult