Patner function for exciable vendor

Hi,
I have a excise   vendor master record ,now i want to assign partner function for that vendor
so please clear it partner function also required excise setting in sap
ordering address is different and invoicing party is different and delivery  party   is different
Regards
kailas

Are you talking about first stage dealer/second stage dealer?
If yes, then go to MIGO- Header Excise tab- Misc-Ship from
Here you can put the vendor code who provides you excise invoice.

Similar Messages

  • ABAP Functions for creating vendor

    Hello,
    I would like to create a program for creating vendor automatically by uploading a text file, where the text file contain the vendor information.
    Can I ask are there any ABAP function for creating vendor? I have searched a function BAPI_VENDOR_CREATE, but I don't know how to use it.
    Can anyone give me some ideas?
    Many thanks
    Sunny

    Hi,
    BAPI_VENDOR_CREATE is a online BAPI which calls the XK01 screen internally. There wont be any import or export parameters for this BAPI. If you have to upload from a text file, you can try with either of the options
    1) Use the standard program RFBIKR00 to upload the vendor from the flat file. check the documentation of the report for details
    2) Create a BDC recording on XK01 and upload the vendor from the flat file
    Vikranth

  • Settign partner function for vendor

    Hi..
    I am trying to configure partner function for a vendor who has different  oredring adress,
    Can anyone explain me the stpes / details of how to configure a Partner function for vendor so that when i give the partner function in PO the adress of the partner function should be displayed.
    And secondly if i create different partner function where do i maintain the address for each partner function.
    Suggestions will be rewarded..
    Regards

    Hi,
    check this thread
    Partner function
    thanks
    suresh

  • Multiple address for one vendor

    Hi all,
    I have various partner function for my vendor. I assigned various partner function .
    I need to know where we have to assign the address to these partner functions like OA, PI and GS.So that in PO i will get correct ordering address .
    Or whether we need to craete separate vendor masterfor the partner functions and assign the vendor master record .
    Request all to reply
    Thanks
    A.Gururajan

    Dear,
    The procedure for setting partner functions:
    Vendor Account group: IMG - LOGISTICS GENERAL - BUSINESS PARTNER - VENDOR - CONTROL - DEFINE ACCOUNT GROUPS AND FIELD SELECTION.
    Define Partner Schema: IMG - MM - PURCHASING - PARTNER - DETERMINATION - PARTNER SETTINGS IN VENDOR MASTER RECORD - DEFINE PARTNER SCHEMAS
    Assign Partner Schema: IMG - MM - PURCHASING - PARTNER DETERMINATION - PARTNER SETTINGS IN VENDOR MASTER RECORD - DEFINE PARTNER SCHEMA. (Assign partner Schema).
    Define Permissible partner role per account group: IMG - MM - PURCHASING - PARTNER DETERMINATION - PARTNER ROLES - DEFINE PERMISSION PARTNER ROLES.
    If you want a partner schema for your own document type then define your partner schema and assign to document type through the below mentioned path:
    IMG - MM - PURCHASING - PARTNER - DETERMINATION - PARTNER SETTINGS IN PURCHASING DOCUMENTS - DEFINE PERMISSIBLE PARTNER SCHEMAS.
    and then ASSIGN PARTNER SCHEMAS TO DOCUMENT TYPE.
    Once you have this configuration done, then you change your vendor with XK02 and define the partner roles.
    Also Check: Partner Function in Vendor Master With Internal Number Range
    Regards,
    Syed Hussain.

  • Function for Vendor Open Items

    Hi Experts,
    Is there any function where I can get open items for a vendor, similar to FBL1N?
    Please Suggest!!!
    Rajiv Ranjan

    Hi,
    or use logical database (ldb) KDF
    and use GET BSIK / LFC1
    A.

  • 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 FB01 Vendor line items postings in 3.1 Version

    Hello all,
    Is there any Function Module  for FB01 Vendor line items postings in 3.1 Version. I do not want to go for BDC. Please suggest.
    Thanks,
    Subba

    Hi,
    search for function module ACCPOSTING* or get development class of transaction FB01 and goto SE80, enter development class - and search in function group's function module.
    Cheers.
    ...Reward if useful.

  • Creation of new partner function for VENDOR

    Hi,
    I've a requirement to create some Partner functions for vendors while creation of vendor. Some Partner functions are available by default and some we need to add. but while doing a BDC we are not able to find how many of them are available or where to put the new Partner function?
    Please let me know, if there is any BAPI availble..
    Regards,
    Anupam

    Try below LSMW batch input method its very esay to upload data
    Object               0040   Vendor master
    Method               0001   Standard
    Program Name         RFBIKR00
    Program Type         B   Batch Input

  • Classic Scenario PO has multiple OA Partner Functions for Vendor

    Hi,
    I have a 'design' issue. My R/3 Vendor has many OA Partner Functions for the different Branches they have and the PO needs to be Faxed to the OA Partner Function number, but the PO needs to be created against the VN Partner Function.
    So, how do i do this in SRM? I was going to have a seperate Catalog link for each OA Partner function, but this is not creating the R/3 PO with VN Partner Function of the 'core' Vendor number.
    Does anyone have any advice for this?
    regards Adam
    Using SRM 5.0 (Server 5.5) SP 8 and R/3 4.6C in Classic Scenario - my catalogs are external vendor.

    Hi
    Please see these links, which might help ->
    Partner function missing in backend PO
    Re: Error in transmission while PO cration
    "Multiple" partner data at PO header
    Partner functions in plan driven MM-SUS
    Re: Partner function not found
    Number range for business partner
    Re: Problem with BP. Assignment: Business partner person to user not unique
    Error in creation of Employee for Business Partner
    Re: enter exactly one partner of type vendor
    Re: Business partner as Vendor and Invoicing Party
    Partner functions in EBP for extended Classic Scenario
    Regards
    - Atul

  • MM-Check Double Invoice functionality for Vendor Invoices

    Dear All,
    How Check Double Invoice functionality for Vendor Invoices can be implemented in SAP?
    We have implemented Check double invoice with the standara sttings for it however if i give my referenece text differently it will aloow me to post double invoices and against vendor open items are shown for payment?
    Is there any other efficient way to do it?
    Thanks and Regards
    Shrinivas

    dear SAPian friend,
    go through the below link and you will find the solution with the screenshots.
    http://sapfunctional.com/MM/Duplicate/Invoices.htm
    U can also do the setting using the SPRO t-code:-
    path is
    >>SPRO
    >>SAP Reference IMG
    >>Materials Management
    >>Logistics Invoice Verification
    >>Incoming Invoice
    >>Set check for duplicate invoices

  • Additional functionality for vendor evaluation in ECC 6.0

    Hi folks,
    Can any one help me in getting the information below.
    Is there any additional functionality for vendor evaluation in ECC 6.0  when compared to ECC 4.7
    Pls let me know the functionality and the difference.
    Thanks
    Vasanth.

    Hi
    Is there any additional functionality for vendor evaluation in ECC 6.0 when compared to ECC 4.7
    The Solution Browser lets you enter start and target releases for functional areas, and provides you with the information about the new functionalities.
    You find the tool from our homepage at http://service.sap.com/erp (see the tool box on the right hand side).
    regards
    Andreas Rudolph

  • Function module/ program for deleting Vendor purchasing org. in BBPMAININT?

    Hi,
    Is there any function module or program available by which i can delete purchasing org. maintained  for SRM vendors in BBPMAININT.
    Regards
    Bharat M

    Hi
    Please use the Standard SRM function module
    *BBPPORG_DELETE*_
    to delete the Purchasing organizations ->
    Sample code - >
        CALL FUNCTION 'BBP_PORG_DELETE' IN UPDATE TASK
          TABLES
            IT_FRG0060 = LT_FRG0060
            IT_FRG0061 = LT_FRG0061.
        COMMIT WORK.
    Hope this will help. Do let me know.
    Regards
    - Atul

  • Order Partner Functions for VENDORs

    Hi All,
    We are using CRM 5.0 and ECC 6.0. We successfully replicated all the VENDORs from ECC to CRM BPs with BBP000-VENDOR role as this features is supported from CRM 5.0.
    We are now trying to get the VENDOR Partner functions replicate from ECC sales order to the Partner Functions for the CRM ORDERS. Looks like SAP doesn't support this feature yet. I am getting the Partner Functions (say Z1 - Freight Carrier ) but the partner data is BLANK. So i am working on a workaround.
    My Issue I am using ORDER_SAVE BADI to enter a BP from CRM to this Partner Function that is coming empty to CRM. For some reason my code is not working. Below is my code
    Data declarations for VENDOR Partner Function*********
      data: lt_partner_ref           type CRMT_PARTNER_EXTERNAL_WRKT,
              ls_partner_ref          type CRMT_PARTNER_EXTERNAL_WRK,
              lt_partner                type CRMT_PARTNER_COMT,
              ls_partner               type CRMT_PARTNER_COM,
              lt_partner_act          type CRMT_PARTNER_COMT,
              lt_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM_TAB,
              ls_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM.
      data:lt_header_ref   type crmt_object_guid_tab,
             guid                type crmt_object_guid.
      guid =  iv_guid.
      insert guid into table lt_header_ref .
      call function 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid       = lt_header_ref
        IMPORTING
          et_partner            = lt_partner_ref                 
        EXCEPTIONS
          document_not_found   = 1
          error_occurred            = 2
          document_locked       = 3
          no_change_authority  = 4
          no_display_authority  = 5
          no_change_allowed   = 6
          others                      = 7.
    Start of the code to VENDOR PARTNER FUNCTIONS for ORDER Heafer/Item ***********
        Read table lt_partner_ref into ls_partner_ref with key partner_fct = 'Z0000007'.
        if ( sy-subrc = 0 ).
            ls_partner-kind_of_entry = 'C'.
            ls_partner-partner_fct = 'Z1'.
            ls_partner-partner_no = '0010060331'.
            ls_partner-display_type = 'BP'.
            ls_partner-no_type = space.
            ls_partner-REF_HANDLE = '100'.
            INSERT ls_partner INTO TABLE lt_partner.
            ls_input_names-fieldname = 'KIND_OF_ENTRY'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_FCT'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_NO'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'DISPLAY_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'NO_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'REF_HANDLE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_field-ref_guid = ls_partner_ref-ref_guid.
            ls_input_field-objectname = 'PARTNER'.
            ls_input_field-ref_handle = '100'.
            ls_input_field-logical_key = '0000'.
            ls_input_field-ref_kind = 'B'.
            INSERT ls_input_field INTO TABLE lt_input_field.
          Endif.
      call function 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_partner           = lt_partner                         "I added this for VENDOR PF
        CHANGING
          ct_input_fields   = lt_input_field
        EXCEPTIONS
          error_occurred         = 1
          document_locked    = 2
          no_change_allowed = 3
          no_authority           = 4
          others                   = 5.
    endmethod.
    Could anyone check my code and suggest any changes?
    Thanks,
    Karuna.

    Hi ROshan,
      Open customer master in XD02  sales view and save it then check in XD03 it should display the partner functions.
    As you said the account group has been changed I think the records needs to be saved again.

  • ERS functionality for vendor at PO doc type level

    Hi All,
    If i select ERS settlement for vendor in vendor master record, for all the POs for that vendor , ERS functionality is checked by default. I dont need this ERS defaulting for POs with specific doc type. Its not practical to uncheck for each items in PO where there are more than 1000 line items. Please provide me a solution?
    regards,
    NBanu

    Hi Banu ,
    For specific material it is possible through Inforecord but not for specific document type.
    Regards
    Ramesh Ch

  • Report to find open items and close items for given vendor

    Hi All,
    What are the steps needed to write a REPORT to find out
    open and close items for a given vendor.
    Which are the fields i'll have to take and what are the comparisons i'll have to make.
    I know,
    BSIK is for open Vendor &
    BSAK for closed Vendors..
    what are the conditions i'll have to check.
    Thanks in Advance..
    Pradeep Alex

    Hi Pradeep,
    This report I developed is definitely useful to you.
    *& Report  ZFI_PROV_IT_VENDOR
    REPORT  ZFI_VENDOR.
    TYPE-POOLS: slis.
    tables: BKPF,
            BSEG,
            bsik,
            bsak,
            bsid,
            bsad,
            lfa1,
            t005u,           "Region Description
            J_1IMOVEND.
    TYPES: BEGIN OF ty_bkpf,
            bukrs type bkpf-bukrs,
            belnr TYPE bkpf-belnr,
            gjahr type bkpf-gjahr,
            blart TYPE bkpf-blart,
            budat TYPE bkpf-budat,
           END   OF ty_bkpf.
    types: begin of ty_J_1IMOVEND,
             lifnr     type lfa1-lifnr,
             J_1IPANNO type J_1IMOVEND-J_1IPANNO,
             J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
             J_1ISERN  type J_1IMOVEND-J_1ISERN,
           end   of ty_J_1IMOVEND.
    TYPES: BEGIN OF ty_bseg,
            belnr TYPE bseg-belnr,
            gjahr type bseg-gjahr,
            bschl TYPE bseg-bschl,
            umskz type bseg-umskz,
            shkzg type bseg-shkzg,
            wrbtr TYPE bseg-wrbtr,
            hkont type bseg-hkont,
            lifnr TYPE bseg-lifnr,
           END   OF ty_bseg.
    types: begin of ty_t005u,
            bland type t005u-bland,
            bezei type t005u-bezei,
           end   of ty_t005u.
    types: begin of ty_lfa1,
            lifnr type lfa1-lifnr,
            name1 type lfa1-name1,   "35
            ort01 type lfa1-ort01,   "35
            ort02 type lfa1-ort02,   "35
            pfach type lfa1-pfach,   "10
            pstlz type lfa1-pstlz,   "10
            regio type lfa1-regio,   "3
            stras type lfa1-stras,   "35
            ktokk type lfa1-ktokk,
            telf1 type lfa1-telf1,   "16
            telf2 type lfa1-telf2,   "16
           end   of ty_lfa1.
    types: begin of ty_bsik,
            bukrs type bsik-bukrs,
            lifnr type bsik-lifnr,
            augdt type bsik-augdt,
            augbl type bsik-augbl,
            belnr type bsik-belnr,
            budat type bsik-budat,
            blart type bsik-blart,
            shkzg type bsik-shkzg,
            wrbtr type bsik-wrbtr,
           end   of ty_bsik.
    types: begin of ty_bsid,
            bukrs type bsid-bukrs,
            lifnr type bsid-kunnr,
            augdt type bsid-augdt,
            augbl type bsid-augbl,
            belnr type bsid-belnr,
            budat type bsid-budat,
            blart type bsid-blart,
            shkzg type bsid-shkzg,
            wrbtr type bsid-wrbtr,
           end   of ty_bsid.
    types: begin of ty_out2,
            lifnr type bsik-lifnr,
            wrbtr type bsik-wrbtr,
            end  of ty_out2.
    types: begin of ty_out,
            lifnr type lfa1-lifnr,
            name1 type lfa1-name1,
            addr(162) type c,
            J_1IPANNO type J_1IMOVEND-J_1IPANNO,
            J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
            J_1ISERN  type J_1IMOVEND-J_1ISERN,
            opbal  type bseg-wrbtr,
            purch type bseg-wrbtr,
            PAYM  type bseg-wrbtr,
            grdeb type bseg-wrbtr,
            othdeb type bseg-wrbtr,
            othcre type bseg-wrbtr,
            tds   type bseg-wrbtr,
            bal   type bseg-wrbtr,
            blart type bkpf-blart,
            bschl type bseg-bschl,
           end  of ty_out.
    types: begin of ty_bsegtemp,
            lifnr TYPE bseg-lifnr,
           end   of ty_bsegtemp.
    types: begin of ty_bsegnew,
            wrbtr TYPE bseg-wrbtr,
            lifnr TYPE bseg-lifnr,
           end   of ty_bsegnew.
    data: it_bsik type table of ty_bsik with header line,
          it_bsid type table of ty_bsid with header line,
          it_bsak type table of ty_bsik with header line,
          it_out2  type table of ty_out2 with header line,
          it_out3 type table of ty_out2 with header line.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
           it_listheader TYPE slis_t_listheader,
           it_alvevent TYPE slis_t_event,
           gt_events TYPE slis_t_event WITH HEADER LINE.
    DATA: I_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA : wa_fieldcat TYPE slis_fieldcat_alv,
           wa_listheader TYPE slis_listheader,
           wa_alvevent TYPE slis_alv_event.
    DATA: WA_SORT TYPE SLIS_SORTINFO_ALV.
    DATA: ls_line TYPE slis_listheader.
    DATA : g_repid  LIKE sy-repid,                  " Program ID
           g_layout TYPE slis_layout_alv.           " Layout Workarea
    DEFINE m_fieldcat.
      wa_fieldcat-col_pos       = &1.               " Fieldcat column postion
      wa_fieldcat-fieldname     = &2.               " Field name
      wa_fieldcat-DO_SUM        = &3.
      wa_fieldcat-seltext_m     = &4.               " Column Text
      wa_fieldcat-outputlen    = &5.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    END-OF-DEFINITION.
    DATA: wa_lfa1 TYPE ty_lfa1,
          wa_bkpf TYPE ty_bkpf,
          wa_bkpf1 type ty_bkpf,
          wa_bsegtemp type ty_bsegtemp,
          wa_bsegnew type ty_bsegnew,
          wa_bsegnew1 type ty_bsegnew,
          wa_J_1IMOVEND type ty_J_1IMOVEND,
          wa_t005u type ty_t005u,
          wa_bseg TYPE ty_bseg,
          wa_out    TYPE ty_out.
    DATA: gt_out TYPE STANDARD TABLE OF ty_out,
          gt_out1 TYPE STANDARD TABLE OF ty_out,
          gt_lfa1 TYPE STANDARD TABLE OF ty_lfa1,
          gt_bsegtemp type standard table of ty_bsegtemp with header line,
          gt_bsegnew type standard table of ty_bsegnew with header line,
          gt_bsegnew1 type standard table of ty_bsegnew with header line,
          gt_J_1IMOVEND type standard table of ty_J_1IMOVEND,
          gt_bkpf1 TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE,
          gt_t005u type standard table of ty_t005u,
          gt_bseg TYPE STANDARD TABLE OF ty_bseg WITH HEADER LINE,
          gt_bkpf TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_budat for bkpf-budat obligatory,
                    s_ktokk for lfa1-ktokk obligatory.
                   s_wrbtr for bseg-wrbtr.
    parameters: p_bukrs type bkpf-bukrs obligatory default '1000'.
               p_gjahr type bkpf-gjahr obligatory.
               p_lifnr type bseg-lifnr obligatory default '300040',
               p_ktokk type lfa1-ktokk obligatory default 'Z200'.
    selection-screen end   of block b1.
    START-OF-SELECTION.
      PERFORM sub_fetch_data.
      PERFORM sub_process_data.
    END-OF-SELECTION.
      PERFORM sub_build_fieldcat.
      PERFORM sub_build_layout.
      PERFORM eventtab_build USING gt_events[].
      PERFORM comment_build USING it_listheader[].
      PERFORM sub_disp_data.
    *&      Form  SUB_BUILD_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM sub_build_fieldcat .
    sort gt_out by name1.
    *DEFINE M_SORT.
       ADD 1 TO WA_SORT-SPOS.
       WA_SORT-FIELDNAME = &1.
       WA_SORT-UP        = 'X'.
       WA_SORT-SUBTOT    = &2.
       APPEND WA_SORT TO I_SORT.
    END-OF-DEFINITION.
    *m_sort 'NAME1' 'X'.
    *M_SORT 'ADDR' 'X'.
      m_fieldcat 1  'LIFNR' ' '  text-026 10.
      m_fieldcat 2  'NAME1' ' '  text-006 35.
      m_fieldcat 3  'ADDR' ' ' text-007 162.
      m_fieldcat 4  'J_1IPANNO' ''  text-008 40.
      m_fieldcat 5  'J_1ICSTNO'  '' text-009 40.
      m_fieldcat 6  'J_1ISERN'  '' text-010 40.
      m_fieldcat 7  'OPBAL'  '' text-011 18.
      m_fieldcat 8  'PURCH'    '' text-012 18.
      m_fieldcat 9  'PAYM' ''  text-013 18.
      m_fieldcat 10  'GRDEB'  '' text-014 18.
      m_fieldcat 11  'OTHDEB'  '' text-020 18.
      m_fieldcat 12  'OTHCRE'  '' text-021 18.
      m_fieldcat 13  'BAL'  '' text-023 18.
      m_fieldcat 14  'TDS'  '' text-022 18.
    ENDFORM.                    " SUB_BUILD_FIELDCAT
    *&      Form  SUB_BUILD_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM sub_build_layout .
      g_layout-zebra             = 'X'.
      g_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " SUB_BUILD_LAYOUT
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    FORM eventtab_build  USING    gt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  COMMENT_BUILD
          text
         -->P_IT_LISTHEADER[]  text
    FORM comment_build  USING    p_it_listheader TYPE
                                            slis_t_listheader.
    data: v_text(30) type c,
          v_datelow(10) type c,
          v_datehigh(10) type c,
          v_month(2) type c,
          v_day(2) type c,
          v_year(4) type c.
    v_day  = s_budat-low+6(2).
    v_month = s_budat-low+4(2).
    v_year = s_budat-low+0(4).
    concatenate v_day '.' v_month '.' v_year into v_datelow.
    clear: v_day,v_month,v_year.
    v_day  = s_budat-high+6(2).
    v_month = s_budat-high+4(2).
    v_year = s_budat-high+0(4).
    concatenate v_day '.' v_month '.' v_year into v_datehigh.
    clear: v_day,v_month,v_year.
    concatenate 'From' v_datelow 'To' v_datehigh into v_text
                                        separated by space.
    clear: v_datelow, v_datehigh.
      ls_line-typ  = 'H'.
      ls_line-info = text-116.
      APPEND ls_line TO p_it_listheader.
    ls_line-typ  = 'S'.
      ls_line-key = text-090.
      ls_line-info = v_text.
      APPEND ls_line TO p_it_listheader.
    ENDFORM.                    " COMMENT_BUILD
    *&      Form  TOP_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader.
    ENDFORM.                    " TOP_OF_PAGE
    *&      Form  SUB_DISP_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM sub_disp_data .
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = g_repid
          it_fieldcat        = it_fieldcat[]
          is_layout          = g_layout
          i_save             = 'U'
          it_events          = gt_events[]
        IT_SORT             = I_SORT[]
        TABLES
          t_outtab           = gt_out1[].
    ENDFORM.                    " SUB_DISP_DATA
    *&      Form  sub_fetch_data
          text
    -->  p1        text
    <--  p2        text
    form sub_fetch_data .
    select bukrs
           belnr
           gjahr
           blart
           budat
           from bkpf
           into table gt_bkpf
           where budat in s_budat
           and   bukrs = p_bukrs
          and   gjahr = p_gjahr
           and   blart in ('KR','KG','KZ','RE','DK','Z1','AB','SA','KA','DZ').
    select belnr
           gjahr
           bschl
           umskz
           shkzg
           wrbtr
           hkont
           lifnr
           from bseg
           into table gt_bseg
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and   gjahr = gt_bkpf-gjahr
          and gjahr = p_gjahr
           and   bschl in (21,25,29,31,50,39,38,19,35).
          and kunnr in gt_
          and lifnr = '0000300019'.
    select belnr
           gjahr
           bschl
           umskz
           shkzg
           wrbtr
           hkont
           kunnr
           from bseg
           appending table gt_bseg
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and   gjahr = gt_bkpf-gjahr
          and gjahr = p_gjahr
           and   bschl in (21,25,29,31,50,39,38,19).
    break manukapur.
    sort gt_bseg by  lifnr bschl.
    delete adjacent duplicates from gt_bseg comparing all fields.
    loop at gt_bseg into wa_bseg.
    if wa_bseg-lifnr is not initial.
    move: wa_bseg-lifnr to wa_bsegtemp-lifnr.
          append wa_bsegtemp to gt_bsegtemp.
          endif.
    endloop.
    delete adjacent duplicates from gt_bsegtemp comparing lifnr.
    select lifnr
            name1
            ort01
            ort02
            pfach
            pstlz
            regio
            stras
            ktokk
            telf1
            telf2
            from lfa1
            into table gt_lfa1
            for all entries in gt_bseg
            where lifnr = gt_bseg-lifnr
            and ktokk in s_ktokk.
           and lifnr = '0000300030'.
    select  bland
            bezei
            from t005u
            into table gt_t005u
            for all entries in gt_lfa1
            where bland = gt_lfa1-regio
            and land1 = 'IN'
            and spras = sy-langu.
    select lifnr
           J_1IPANNO
           J_1ICSTNO
           J_1ISERN
           from J_1IMOVEND
           into table gt_J_1IMOVEND
           for all entries in gt_bseg
           where lifnr = gt_bseg-lifnr.
    *select bukrs
          belnr
          blart
          budat
          from bkpf
          into table gt_bkpf1
          where budat < s_budat-low.
          and zfdbt < s_budat-low.
    select
           wrbtr
           lifnr
           from bseg
           into table gt_bsegnew
           for all entries in gt_bkpf
           where belnr = gt_bkpf-belnr
           and xopvw = 'X' .
          and zfbdt < s_budat-low.
    select bukrs
           lifnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsik
           into table it_bsik
           for all entries in gt_bseg
           where lifnr = gt_bseg-lifnr
          and   lifnr = '0000300000'
           and   bukrs = '1000'
           and   budat <= s_budat-low.
    select bukrs
           lifnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsak
           appending table it_bsik
           for all entries in gt_bseg
           where bukrs = '1000'
           and   lifnr = gt_bseg-lifnr
          and   lifnr = '0000300000'
           and   budat <= s_budat-low
           and   augdt > s_budat-low.
    select bukrs
           kunnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsid
           into table it_bsid
           for all entries in gt_bseg
           where bukrs = '1000'
           and   kunnr = gt_bseg-lifnr
          and   kunnr = '0000300000'
           and   budat <= s_budat-low.
    select bukrs
           kunnr
           augdt
           augbl
           belnr
           budat
           blart
           shkzg
           wrbtr
           from bsad
           appending table it_bsid
           for all entries in gt_bseg
           where bukrs = '1000'
           and   kunnr = gt_bseg-lifnr
          and   kunnr = '0000300000'
           and   budat <= s_budat-low
           and   augdt > s_budat-low.
    if it_bsid[] is not initial.
    append lines of it_bsid to it_bsik.
    endif.
    *delete gt_bsegnew where lifnr  <> '0000300000'.
    *break manukapur.
    *sort gt_bsegnew by lifnr.
    *loop at gt_bsegnew into wa_bsegnew.
    *collect wa_bsegnew into gt_bsegnew1.
    *endloop.
    loop at it_bsik .
    it_out2-lifnr = it_bsik-lifnr.
    *it_out1-budat = it_bsik-budat.
    *it_out1-blart = it_bsik-blart.
    if it_bsik-SHKZG = 'H'.
    it_out2-wrbtr = it_bsik-wrbtr.
    else .
    it_out2-wrbtr = it_bsik-wrbtr * -1.
    endif.
    append it_out2.
    clear: it_out2, it_bsik.
    *endif.
    *clear it1.
    endloop.
    sort it_out2 by lifnr.
    loop at it_out2.
    it_out3-lifnr = it_out2-lifnr.
    it_out3-wrbtr = it_out2-wrbtr.
    collect it_out3.
    clear: it_out3, it_out2.
    endloop.
    endform.
    *&      Form  sub_process_data
          text
    -->  p1        text
    <--  p2        text
    form sub_process_data .
    *sort gt_bsegtemp by  lifnr .
    sort gt_bseg by lifnr bschl.
    sort gt_bsegnew by lifnr.
    sort it_out3 by lifnr.
    *loop at gt_bsegnew into wa_bsegnew.
    *at end of lifnr.
    *sum.
    *endat.
    *endloop.
    sort gt_bkpf by blart.
    loop at gt_bseg into wa_bseg.
    if wa_bseg-lifnr is not initial.
    read table gt_lfa1 into wa_lfa1 with key lifnr = wa_bseg-lifnr.
    move: wa_lfa1-name1 to wa_out-name1,
         wa_lfa1-lifnr to wa_out-lifnr.
    read table gt_t005u into wa_t005u with key bland = wa_lfa1-regio.
    concatenate wa_lfa1-stras ',' wa_lfa1-ort01 ','
                wa_lfa1-ort02 ',' wa_t005u-bezei ','
                wa_lfa1-pfach ','
                wa_lfa1-pstlz ',' 'Ph:'
                wa_lfa1-telf1 ','
                wa_lfa1-telf2
                into wa_out-addr separated by space.
    read table gt_J_1IMOVEND into wa_J_1IMOVEND with key lifnr = wa_bseg-lifnr.
    move: wa_J_1IMOVEND-J_1IPANNO to wa_out-J_1IPANNO,
          wa_J_1IMOVEND-J_1ICSTNO to wa_out-J_1ICSTNO,
          wa_J_1IMOVEND-J_1ISERN  to wa_out-J_1ISERN.
          read table gt_bkpf into wa_bkpf with key belnr = wa_bseg-belnr.
    if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 31 or
    wa_bkpf-blart = 'KR' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-purch = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-purch = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KR' and wa_bseg-bschl = 50.
    *wa_out-tds = wa_out-tds + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-tds = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-tds = wa_bseg-wrbtr * -1.
    endif.
    endif.
    *wa_out-tds = wa_bseg-wrbtr.
    endif.
    if wa_bkpf-blart = 'KG' and wa_bseg-bschl = 21.
    *wa_out-grdeb =  wa_out-grdeb + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 21.
    *wa_out-grdeb =  wa_out-grdeb + wa_bseg-wrbtr.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-grdeb = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 25
    *or wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29
    **and wa_bseg-umskz = 'A'
    or wa_bkpf-blart = 'SA' and wa_bseg-bschl = 25.
    if wa_bseg-shkzg = 'H'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-paym = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    *wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    wa_out-paym = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'DK' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'SA' and wa_bseg-bschl = 31.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 38.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'DZ' and wa_bseg-bschl = 19
    and wa_bseg-umskz = 'A'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 39
    and wa_bseg-umskz = 'G' or
           wa_bseg-umskz = 'H' or
           wa_bseg-umskz = 'J' or
           wa_bseg-umskz = 'L' OR
           wa_bseg-umskz = 'A'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 35.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if ( wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29 )
       and wa_bseg-umskz = 'A' or
           wa_bseg-umskz = 'B' or
           wa_bseg-umskz = 'I' or
           wa_bseg-umskz = 'M' or
           wa_bseg-umskz = 'O' or
           wa_bseg-umskz = 'V'.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21 .
    if wa_bseg-shkzg = 'H'.
    wa_out-othcre = wa_bseg-wrbtr.
    else.
    if wa_bseg-shkzg = 'S'.
    wa_out-othcre = wa_bseg-wrbtr * -1.
    endif.
    endif.
    endif.
    **if wa_bseg-shkzg = 'H'.
    ***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    **wa_out-othdeb = wa_bseg-wrbtr.
    **else.
    **if wa_bseg-shkzg = 'S'.
    ***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
    **wa_out-othdeb = wa_bseg-wrbtr * -1.
    **endif.
    **endif.
    **endif.
    ***if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
          wa_out-othdeb =  wa_bseg-wrbtr.
    ***endif.
    ***if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21.
          wa_out-othdeb =  wa_bseg-wrbtr.
    ***endif.
    read table it_out3 with key lifnr = wa_bseg-lifnr binary search.
    on change of wa_bseg-lifnr.
    *move: wa_lfa1-name1 to wa_out-name1,
        wa_lfa1-lifnr to wa_out-lifnr.
    wa_out-opbal = it_out3-wrbtr.
    endon.
    *if wa_out-opbal is not initial.
    *wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    **else.
    *wa_out-bal = wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    *endif.
    wa_out-bal = wa_out-opbal + wa_out-purch + wa_out-paym + wa_out-grdeb + wa_out-othdeb + wa_out-othcre.
    at end of lifnr.
    *wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
    append wa_out to gt_out.
    *collect wa_out into gt_out.
    clear wa_out.
    clear it_out3.
    clear wa_bsegnew1.
    endat.
    endif.
    clear: wa_bseg, wa_bkpf, wa_J_1IMOVEND.
    endloop.
    loop at gt_out into wa_out.
    collect wa_out into gt_out1.
    endloop.
    endform.                    " sub_process_data
    Regards,
    Santosh Kumar M.

Maybe you are looking for

  • Error while strting a process from jsp on a JBoss JBpm server

    Hello! I created a very simple jsp file just to try to start a process from it. I'm using JBoss JBpm. This is my jsp file: <%@ page import="org.jbpm.*" %> <%@ page import="org.jbpm.graph.def.*" %> <%@ page import="org.jbpm.graph.exe.*" %> <%@ page im

  • On ipad 2 camera how do you turn the flash on when taking a picture?

    I need help on turning the flash on

  • Xml:version error

    I've stored a very simply stylesheet in to our database using the xmldoc.save() function which produces a stylesheet in the database that looks like this: <?xml version = '1.0' encoding = 'ASCII'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://wwww

  • Conditional Build Tags in Table

    I have a table with three rows (in the middle of the table) that are conditional tags. When I generate the Webhelp output for the version that excludes the tagged rows, I end up with blank lines in the table where the tagged rows were omitted. How do

  • Hp advisor not working right

    I have a laptop HP HDX X16T-1200 CTO PREMIUM NOTEBOOK PC and it has two problems first one COMPUTER WON'T DO SYSTEM RESTORE TO AN EARLIER TIME, I have a lot of restore points second one HP ADVISOR IS NOT WORKING RIGHT, I open the dashboard and everyt