Clearing Vendor:Header data F-44

Hi
I need to clear vendor open invoices using BAPI's for T-code F-44 .I've got through various FM like bapi_acc_document_post and bapi_ar_acc_getbalanceditems but could'nt find solution.Have any boby worked on this tcode to clear vendor accounts using bapi's.Its really simple working with bdc's to transfer data from flat file to the above transaction.But as known every vendor has huge sets of items and this could be a huge performance issue....so to avoid this in future we need to work on this using exclusively BAPI's......Any suggestions or sample codes wud surely be appreciated....
Thanks in Advance......

Hi,
my suggested method :
1) works
2) is very simple
sample:
* 0 initialization
  xbkpf = bbkpf.
*1 header - fill xbkpf
  MOVE: 'FB05' TO xbkpf-tcode.
  MOVE itab-bukrs TO xbkpf-bukrs.
  MOVE '90'  TO xbkpf-blart.
  CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4)
              INTO xbkpf-bldat.
  CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4)
              INTO xbkpf-budat.
  MOVE itab-waers TO xbkpf-waers.
  xbkpf-auglv = 'UMBUCHNG'.
  TRANSFER xbkpf TO file.
*2 fill bselk
  xselk = bselk.
  xselk-agkon = itab-lifnr.
  xselk-agbuk = itab-bukrs.
  xselk-agkoa = 'K'.
  xselk-xnops = 'X'.
  TRANSFER xselk TO file_si.
*3 fill bselp (clearing criterion)
    xselp = bselp.
    xselp-feldn_1 = 'SGTXT'.
    MOVE  itab-sgtxt TO xselp-slvon_1.
    TRANSFER xselp TO file_si.
regards Andreas

Similar Messages

  • Clearing Vendor : Header data - Posting with assignment problem

    Hi,
    I would like to write a program or if possible would like to use a BAPI  to post Clearing vendor data in t-code F-44 with assignment option.
    I looked at to bapi BAPI_ACC_INVOICE_RECEIPT_POST and BAPI_ACC_DOCUMENT_POST, but both of them needs tax key and in F-44 we do not use it. as an other example we'd like to clear it with the acc. document and  Line Item of acc. doc .(BSEG-BUZEI) 
    Is there any idea about how to do this?
    Kind Regards.

    Hi,
    my suggested method :
    1) works
    2) is very simple
    sample:
    * 0 initialization
      xbkpf = bbkpf.
    *1 header - fill xbkpf
      MOVE: 'FB05' TO xbkpf-tcode.
      MOVE itab-bukrs TO xbkpf-bukrs.
      MOVE '90'  TO xbkpf-blart.
      CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4)
                  INTO xbkpf-bldat.
      CONCATENATE sy-datum+6(2) sy-datum+4(2) sy-datum(4)
                  INTO xbkpf-budat.
      MOVE itab-waers TO xbkpf-waers.
      xbkpf-auglv = 'UMBUCHNG'.
      TRANSFER xbkpf TO file.
    *2 fill bselk
      xselk = bselk.
      xselk-agkon = itab-lifnr.
      xselk-agbuk = itab-bukrs.
      xselk-agkoa = 'K'.
      xselk-xnops = 'X'.
      TRANSFER xselk TO file_si.
    *3 fill bselp (clearing criterion)
        xselp = bselp.
        xselp-feldn_1 = 'SGTXT'.
        MOVE  itab-sgtxt TO xselp-slvon_1.
        TRANSFER xselp TO file_si.
    regards Andreas

  • F-48 (post vendor down payment:header data)

    Hi Experts,
    Good Evening to you,
    when i was posting F-48 (post vendor down payment:header data) i was getting an error of No Special G/L acct defined for acct type K sp. G/L ind B recon.acct so at that time i went to OBYR and given in Acct type-K SGL Ind-B in that given Recon account and Special GL Account both the numbers but still the erroring is coming. Later i went to FS00 and checked in Control Data that the GL Account the reconciliation account-vendor is already given but still the error is coming.
    So if anybody faced the same error means let me know.
    Awaiting for your golden replies & points will be assign for useful answers.
    Thanks & Best Regards,
    KK

    Hi Rams,
    The problem of "No Special G/L acct defined for acct type K ....." has been rectified when i specify the Special GL A/c in OBYR.
    Now the issue is i gave a wrong Sp GL account in OBYR and posted a document later i recongnise that i gave wrong SP GL and went back to OBYR and gave the correct SP GL A/c number. So there was a posting has done earlier 1 document so can you tellme how to change from Old Sp GL  to New Sp GL.
    Awaiting for your golden reply.
    thanks & best regards,
    KK.

  • How to clear Vendor Debit item Through F110

    Hi All,
    I have a new requirement,
    I have a vendor for which transactions are posted in multiple currecies, like USD & EUR.
    I have 2 invoices for this vendor, one is in EUR, and other one is in USD, along with this i have a dabit balance for this vendor which generated through a credit note.
    now when iam trying to make the payament for this Vendor thrugh F110, and try to clear the debit amount also, the system is throwing one error message saying that "Enter incoming payment method for the debit amount "(whici is in USD)
    Please let me know how to solve this issue
    Thanks in advance

    Hi Robert,
    This is the content of SAP Note 164835 as follows:
    SAP Note 164835 - F110: Clearing credit memos and
    invoices
    Note Language: English Version: 14 Validity: Valid Since 29.05.2008
    Summary
    Symptom
    When you execute a payment run, you select credit memos and invoices for a
    customer or a vendor, but the system does not clear them together. In the
    payment (default) log, the system may generate the error message FZ
    347:"...none of the payment methods defined can be used for these items".
    Other terms
    F110, SAPF110S, clearing, FZ 347
    Reason and Prerequisites
    The items to be cleared do not match in particular fields (see below).
    Therefore, they are not paid together.
    You can set a payment method only for either outgoing or incoming payments.
    This explains the error message FZ 347.
    Example
    - Payment run is executed with payment method U for outgoing
    payment.
    - Credit memo is not cleared against invoice.
    - Invoice is paid with U.
    - Error message FZ 347 is generated for the credit memo.
    Solution
    The following explains in general how to clear, and describes some options
    for eliminating errors. The logic of the grouping in the payment program is
    independent of the type of the documents (for example, invoice, credit
    memo, down payment, cross-company code posting).
    General information
    o You can pay open items together using the automatic payment
    transactions, but only if certain fields are identical. The
    structure ZHLG1 specifies these fields. Important fields are:
    - Currency
    - Receiver
    - Payment method in the item
    - Bank details in the item
    o Whenever invoices and credit memos are in different payment groups,
    you cannot clear them together, even if the credit memo contains an
    invoice reference. If you set a payment group for a business
    27.12.2010 Page 2 of 4
    SAP Note 164835 - F110: Clearing credit memos and
    invoices
    partner (grouping key in the master record), then this is saved in
    structure ZHLG1 (field PAYGR). This way the invoice reference in
    the credit memo is overridden if they do not belong to the same
    payment group.
    o Invoice and credit memo must be due at the date of clearing. The
    due date of a credit memo without invoice reference (BSEG-REBZG) is
    the baseline date for payment (BSEG-ZFBDT), and for a credit memo
    with a fixed value date (BSEG-REBZG = 'V'), the due date is
    calculated in the same way as for an invoice. For credit memos with
    invoice reference, the due date of the invoice applies.
    o You cannot clear credit memos and invoices if the payment is
    supposed to be made using a payment method set for the POR
    procedure.
    Invoices are grouped with a POR number with the document number as
    an additional part of the grouping key so as to save the individual
    payment required for POR payment methods. Invoice-related credit
    memos for invoices with POR numbers receive the same grouping key
    as the related invoice. This ensures that the clearing is
    performed. However, you can no longer make payments using the POR
    payment method because this payment method allows only one item to
    be paid. However, you can make the payment using a different
    payment method.
    The POR procedure is only relevant for payment transactions with
    the Swiss Postal Service. Consequently, the relevant fields in the
    document and in the business partner master record are only of
    importance in Switzerland.
    What can you do?
    o Check the payment methods in the line items (field BSEG-ZLSCH). For
    clearing, these must be filled with the same value.
    o If you have entered a specific payment method for the items, then
    check Customizing for this payment method (transaction FBZP). The
    indicator "Single payment for marked item" should not be set there.
    o Check the field "Grouping key" in the master record of the business
    partner for payment transactions in the company code. If, for
    example, there is a grouping set according to assignment number,
    then the invoice and credit memo must have the same assignment
    number in the business partner line for clearing. Using transaction
    OBAP, you can define which fields of the key you want the system to
    use for grouping.
    o Check the indicator "Pay all items separately" (LFB1- or
    KNB1-XPORE) in the master record of the business partner for
    payment transactions in the company code. If this field is set,
    each open item for this business partner is paid separately.
    o If you have set the indicator "Separate payment for each Business
    Area" (T042-XGBTR) for the payment program (all company codes) in
    Customizing, check the business area in the items. They must match
    in this case.
    o Check the house bank in the line items (field BSEG-HBKID). The
    27.12.2010 Page 3 of 4
    SAP Note 164835 - F110: Clearing credit memos and
    invoices
    values must also match for clearing. A document without house bank
    can only be cleared with a document with house bank if this house
    bank is defined in the master record of the business partner
    (LFB1-HBKID or KNB1-HBKID).
    Make sure that the house bank from the payment program is filled
    for any reset clearing documents (see Note 159607).
    o Check the partner bank type in the line items (> Other data > field
    BSEG-BVTYP). These values must also match for clearing. You can
    specify the partner bank type in the master record of the business
    partner for general payment transactions.
    o For postings to one-time accounts, the address data is encoded and
    saved in field BSEC-EMPFG. The coding routine has been changed in
    Release 3.0E. Therefore, if you want to offset documents from an
    earlier release against documents from a later release (for
    example, after an upgrade) you need to check the contents of this
    field. These values must match for clearing. If this is not the
    case, the documents from the earlier release need to be reversed
    and be posted again. If reversal is not possible, contact SAP
    Support.
    o If you do not clear using a payment method set with POR procedure
    (with or without invoice reference in the credit memo), then check
    the contents of the fields BSEG-ESRNR, BSEG-ESRRE and BSEG-ESRPZ.
    They must not be filled if you do not enter a payment method in the
    item.
    o If you set a separate payment for each payment reference (for
    example separated by a CID number in Norway or reference number in
    Finland) (FBZP > Paying Company Codes > field T042B-XKIDS), then
    the items for a clearing in field BSEG-KIDNO must be the same. Note
    that the Customizing setting (T042B-XKIDS) is effective only if
    vendors are involved in the payments. When you separate the
    payments by payment reference, also take into account that no
    outgoing payment can be generated for a payment reference for which
    only credit memos exist.
    o Check the structure ZHLG1 in your system. If you have inserted
    additional fields there, the line items must also match in these
    fields. Contact your consultant.
    Header Data
    Release Status: Released for Customer
    Released on: 30.05.2008 10:55:56
    Master Language: German
    Priority: Recommendations/additional info
    Category: Consulting
    Primary Component: FI-AP-AP-B Payment Progam / Payment transfer
    (DE, JP, US)
    Secondary Components:
    27.12.2010 Page 4 of 4
    SAP Note 164835 - F110: Clearing credit memos and
    invoices
    RE-RT Rental
    The Note is release-independent
    Related Notes
    Number Short Text
    1084325 FSCM-BD: Payment method for invoice-related credit memo II
    305414 F110: Unintelligible grouping of documents
    197626 Partner bank category in RAs and payment program
    159607 F110: Reset clearing is not offset against
    143311 F110:Incorr.due date for cred.memo w/ fix.val.date
    109233 F110: message FZ347 or several payment documents
    86578 Guidelines for F110 Payment Program (W/Check mgmt)
    33288 Payment methods for rental agreement
    22856 Customer credit memos are not paid
    20484 Payment program does not clear due items
    4904 Credit memo clearing or down pmnt clearing for POR

  • Get PO from vendor master data

    Hi,
    Those any body knows a BAPI or FM that would get the PO that was created in the IDOC from vendor master data?
    Please help...
    thank you...
    regards,
    mae

    Hi Mae,
    hope this may be of some help.
    REPORT zpo_bapi_purchord_tej.
    DATA DECLARATIONS *
    TYPE-POOLS slis.
    TYPES: BEGIN OF ty_table,
    v_legacy(8),
    vendor TYPE bapimepoheader-vendor,
    purch_org TYPE bapimepoheader-purch_org,
    pur_group TYPE bapimepoheader-pur_group,
    material TYPE bapimepoitem-material,
    quantity(13),
    delivery_date TYPE bapimeposchedule-delivery_date,
    net_price(23),
    plant TYPE bapimepoitem-plant,
    END OF ty_table.
    TYPES: BEGIN OF ty_alv,
    v_legs(8),
    success(10),
    v_legf(8),
    END OF ty_alv.
    TYPES: BEGIN OF ty_alv1,
    v_legf1(8),
    v_msg(500),
    END OF ty_alv1.
    *-----Work area declarations.
    DATA: x_table TYPE ty_table,
    x_header TYPE bapimepoheader,
    x_headerx TYPE bapimepoheaderx,
    x_item TYPE bapimepoitem,
    x_itemx TYPE bapimepoitemx,
    x_sched TYPE bapimeposchedule,
    x_schedx TYPE bapimeposchedulx,
    x_commatable(255),
    x_alv TYPE ty_alv,
    x_alv1 TYPE ty_alv1,
    x_alv2 TYPE ty_alv1.
    *-----Internal table declarations.
    DATA: it_table TYPE TABLE OF ty_table,
    it_commatable LIKE TABLE OF x_commatable,
    it_item TYPE TABLE OF bapimepoitem,
    it_itemx TYPE TABLE OF bapimepoitemx,
    it_sched TYPE TABLE OF bapimeposchedule,
    it_schedx TYPE TABLE OF bapimeposchedulx,
    it_alv TYPE TABLE OF ty_alv,
    it_alv1 TYPE TABLE OF ty_alv1,
    it_alv2 TYPE TABLE OF ty_alv1.
    DATA: po_number TYPE bapimepoheader-po_number,
    x_return TYPE bapiret2,
    it_return TYPE TABLE OF bapiret2,
    v_file TYPE string,
    v_temp(8),
    v_succsount TYPE i VALUE 0,
    v_failcount TYPE i VALUE 0,
    v_total TYPE i.
    DATA: v_temp1(5) TYPE n VALUE 0.
    DATA: x_event TYPE slis_t_event,
    x_fieldcat TYPE slis_t_fieldcat_alv,
    x_list_header TYPE slis_t_listheader,
    x_event1 LIKE LINE OF x_event,
    x_layout1 TYPE slis_layout_alv,
    x_variant1 TYPE disvariant,
    x_repid2 LIKE sy-repid.
    DATA : it_fieldcat TYPE TABLE OF slis_t_fieldcat_alv.
    SELECTION-SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK v_b1 WITH FRAME.
    *-----To fetch the flat file.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK v_b1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN.
    IF p_file IS INITIAL.
    MESSAGE text-001 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-----To use F4 help to find file path.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    v_file = p_file.
    START-OF-SELECTION *
    START-OF-SELECTION.
    PERFORM gui_upload.
    LOOP AT it_table INTO x_table.
    PERFORM header_details.
    v_temp = x_table-v_legacy.
    LOOP AT it_table INTO x_table WHERE v_legacy = v_temp.
    PERFORM lineitem.
    PERFORM schedule.
    ENDLOOP.
    DELETE it_table WHERE v_legacy = v_temp.
    PERFORM bapicall.
    MOVE po_number TO x_alv-success.
    APPEND x_alv TO it_alv.
    CLEAR x_alv.
    *-----To clear the item details in internal table after the operation for a header.
    REFRESH: it_item,
    it_itemx,
    it_sched,
    it_schedx.
    CLEAR: v_temp1.
    ENDLOOP.
    v_total = v_succsount + v_failcount.
    PERFORM display_alv.
    FORM GUI_UPLOAD *
    FORM gui_upload .
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    TABLES
    data_tab = it_commatable
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17
    IF sy-subrc = 0.
    *-----To fetch the comma seperated flat file into an internal table.
    LOOP AT it_commatable INTO x_commatable.
    IF x_commatable IS NOT INITIAL.
    SPLIT x_commatable AT ',' INTO
    x_table-v_legacy
    x_table-vendor
    x_table-purch_org
    x_table-pur_group
    x_table-material
    x_table-quantity
    x_table-delivery_date
    x_table-net_price
    x_table-plant.
    APPEND x_table TO it_table.
    ENDIF.
    CLEAR x_table.
    ENDLOOP.
    ENDIF.
    ENDFORM. " gui_upload
    FORM HEADER_DETAILS *
    FORM header_details .
    MOVE 'NB' TO x_header-doc_type.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-vendor
    IMPORTING
    output = x_table-vendor
    MOVE x_table-vendor TO x_header-vendor.
    MOVE x_table-purch_org TO x_header-purch_org.
    MOVE x_table-pur_group TO x_header-pur_group.
    x_headerx-doc_type = 'X'.
    x_headerx-vendor = 'X'.
    x_headerx-purch_org = 'X'.
    x_headerx-pur_group = 'X'.
    ENDFORM. " header_details
    FORM LINEITEM *
    FORM lineitem .
    v_temp1 = v_temp1 + 10.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_temp1
    IMPORTING
    output = v_temp1.
    MOVE v_temp1 TO x_item-po_item.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-material
    IMPORTING
    output = x_table-material.
    MOVE x_table-material TO x_item-material.
    MOVE x_table-quantity TO x_item-quantity.
    MOVE x_table-net_price TO x_item-net_price.
    MOVE x_table-plant TO x_item-plant.
    x_itemx-po_item = v_temp1.
    x_itemx-material = 'X'.
    x_itemx-quantity = 'X'.
    x_itemx-net_price = 'X'.
    x_itemx-plant = 'X'.
    APPEND x_item TO it_item.
    APPEND x_itemx TO it_itemx.
    CLEAR: x_item, x_itemx.
    ENDFORM. " lineitem1
    FORM SCHEDULE *
    FORM schedule .
    MOVE x_table-delivery_date TO x_sched-delivery_date.
    MOVE v_temp1 TO x_sched-po_item.
    x_schedx-delivery_date = 'X'.
    x_schedx-po_item = v_temp1.
    APPEND x_sched TO it_sched.
    APPEND x_schedx TO it_schedx.
    CLEAR: x_sched, x_schedx.
    ENDFORM. " schedule
    FORM BAPICALL *
    FORM bapicall .
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = x_header
    poheaderx = x_headerx
    IMPORTING
    exppurchaseorder = po_number
    TABLES
    return = it_return
    poitem = it_item
    poitemx = it_itemx
    poschedule = it_sched
    poschedulex = it_schedx.
    IF po_number IS NOT INITIAL.
    v_succsount = v_succsount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legs.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ELSE.
    v_failcount = v_failcount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legf.
    MOVE x_table-v_legacy TO x_alv1-v_legf1.
    LOOP AT it_return INTO x_return.
    IF x_alv1-v_msg IS INITIAL.
    MOVE x_return-message TO x_alv1-v_msg.
    ELSE.
    CONCATENATE x_alv1-v_msg x_return-message INTO x_alv1-v_msg SEPARATED BY space.
    ENDIF.
    ENDLOOP.
    APPEND x_alv1 TO it_alv1.
    CLEAR x_alv1.
    ENDIF.
    ENDFORM. " bapicall
    FORM DISPLAY_ALV *
    FORM display_alv .
    PERFORM x_list_header.
    PERFORM build_fieldcat CHANGING x_fieldcat.
    x_repid2 = sy-repid.
    x_event1-name = 'TOP_OF_PAGE'.
    x_event1-form = 'TOP_OF_PAGE'.
    APPEND x_event1 TO x_event.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = x_fieldcat
    i_callback_user_command = 'USER_COMMAND'
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_save = 'A'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv
    EXCEPTIONS
    program_error = 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.
    ENDFORM. " display_master_data
    FORM USER_COMMAND *
    FORM user_command USING ucomm LIKE sy-ucomm selfield
    TYPE slis_selfield.
    READ TABLE it_alv INTO x_alv INDEX selfield-tabindex.
    CLEAR : x_alv2,it_alv2[].
    LOOP AT it_alv1 INTO x_alv1 WHERE v_legf1 = x_alv-v_legf.
    x_alv2 = x_alv1.
    APPEND x_alv2 TO it_alv2 .
    ENDLOOP.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv.
    DATA : x3_fieldcat LIKE LINE OF it_fieldcat.
    CLEAR : x3_fieldcat,it_fieldcat[].
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_LEGF1'.
    x3_fieldcat-reptext_ddic = text-111.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_MSG'.
    x3_fieldcat-reptext_ddic = text-112.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    x_layout1-colwidth_optimize = 'X'.
    x_layout1-zebra = 'X'.
    IF it_alv2[] IS NOT INITIAL.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = it_fieldcat
    i_save = 'A'
    i_callback_top_of_page = 'TOP'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv2
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDIF.
    ENDFORM.
    FORM USER_COMMAND *
    FORM top.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = 'Commentry'.
    ENDFORM.
    FORM BUILD_FIELDCAT *
    FORM build_fieldcat CHANGING et_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: x1_fieldcat TYPE slis_fieldcat_alv.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '1'.
    x1_fieldcat-fieldname = 'V_LEGS'.
    x1_fieldcat-reptext_ddic = text-108.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '2'.
    x1_fieldcat-fieldname = 'SUCCESS'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-109.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '3'.
    x1_fieldcat-fieldname = 'V_LEGF'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-110.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    ENDFORM. " build_fieldcat
    FORM BUILD_LIST_HEADER *
    FORM x_list_header.
    DATA: x_list_header1 TYPE slis_listheader.
    *-----List Header: type H
    CLEAR x_list_header1 .
    x_list_header1-typ = 'H'.
    x_list_header1-info = text-105.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: type S
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-106.
    x_list_header1-info = v_total.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: Type S
    CLEAR x_list_header1 .
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-107.
    x_list_header1-info = v_succsount.
    APPEND x_list_header1 TO x_list_header.
    ENDFORM. " build_list_header
    FORM TOP_OF_PAGE *
    FORM top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = x_list_header.
    ENDFORM. " TOP_OF_PAGE
    cheers,
    Hema.

  • How to clear vendor open items if vendor invoice currency and payment currency different

    Hi All.
    How to clear vendor open items through f-44 if vendor invoice currency is EUR , payment currency is USD  but local currency is INR
    while clearing through f-44 system showing error as "to large for clearing clearing is not possible"
    I checked all configuration, configuration wise no problem
    BR.
    Chandra

    Hi Chandra,
    You chose any one of the currency i.e. EUR/INR/USD for clearing in F-44. After selecting line items for clearing, system will show a difference. Click on over view button and manually write off the difference by selecting any one account i.e. dummy or small diff.account, after that click on process open items then system will show the difference 0 and simulate the document, here system will post gain/loss exchange GL postings along with other line items. After save the document, manually pass journal entry to dummy account and gain/loss account. I have explained clearly in the below example.
    Invoice is in USD - 1000 & INR - 60000
    Payment is in INR - 60000
    Now I am going to clear these in INR currency in F-44 on 31.03.2015. On this date the exchange rate for USD is 60.10. At the time of clearing system will post the below entry
    Vendor A/c Dr 60000 (invoice)
    Vendor A/c Cr 60000 (Payment)
    Gain from exchange rate A/c Cr  100 (60000 - 60100)
    Small diff.write off A/c (or) Dummy A/c Dr 100
    After done the above posting, we have to pass below manual JV in FB01
    Gain from exchange rate A/c Dr  100
    Small diff.write off A/c (or) Dummy A/c Cr 100
    Regards,
    Mukthar

  • Unable to clear Vendor f-44

    Hi All,
    Unable to clear vendor F-44, after selecting item and when simulating getting error as Posting is only possible with a zero balance; correct document.
    The posted documents are old fiscal year document and the Clearing date is current date.
    with regards,
    Moderator: Please, avoid asking basic qeustions

    Hi,
    Just check whether the Debit amount and Credit amounts are tallying or not.
    Debit should be equal to Credit
    Just check once again
    Thanks
    Edited by: nkonnipati on Feb 27, 2012 3:47 PM

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • Payment terms in Vendor Master data and purchasing info record

    Hi, all, I met one trouble. While I create Purchase Order. In the header item, payment terms is automatically pop up from the data maintaining the vendor master data or purchasing info record if there is difference payment terms between in vendor master data and in purchasing info record. What happend?
    Sometimes, When you create purchase order, payment terms is not automatically pop up even you maintained in the vendor master data or purchasing info record. Why? Is it meaning that I can manually to input payment terms while create each purchase order which can be difference data with vendor master data or purchase info record?
    Thank you very much in advance,

    Hi,
    The payment terms is usually defaulted from either vendor master or purchasing master data record such as contract/outline agreement.  Unless it is set through configuration that the payment terms be set as mandatory, any failure to maintain payment terms won't stop you from posting your PO as this information will only be useful during invoice receipt maintenance.  Having said that if you are setting up your system with discount condition type as part of your PO pricing schema then it is necessary that the payment terms shall be maintained during PO creation.
    Cheers,
    HT

  • Vendor master data file structure

    Hello Guys,
    I want to knw the flat file strucute of vendor master data (specially vendor with multiple banks)
    pls let me knw tht
    thnks
    sunny

    IT CAN BE SINGLE FLAT FILE OR IT CAN BE CSV SEPARATED BY COMMA
    OR IT CAN BE TWO
    IN ORDER TO UPLOAD SUCH A FILE YOU HAVE TO USE BDC TABLE CONTROL
    HERE IS THE SAMPLE CODE WITH 2 FLAT FILES
    report ZABVENDOR_UPLOAD1
           no standard page heading line-size 255.
    types :begin of ty_ven,
    i1 TYPE c,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    end of ty_ven.
    data: it_ven type table of ty_ven,
          wa_ven like line of it_ven.
    types: begin  of ty_bank,
             j1 type c,
             banks LIKE lfbk-banks,"BANK COUNTRY KEY
             bankl LIKE lfbk-bankl,"BANK KEYS
             bankn LIKE lfbk-bankn,"CONTROL KEY
             koinh LIKE lfbk-koinh,"aacount name
             BANKA LIKE BNKA-BANKA,
         end of ty_bank.
    data:it_bank type table of ty_BANK,
          wa_bank like line of it_BANK.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    *DATA : c TYPE i.
    include bdcrecx1.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\VN1.TXT'
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      TABLES
        DATA_TAB                      = IT_VEN.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\BANK.TXT'
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
    TABLES
        DATA_TAB                      = IT_BANK.
    *ENDLOOP.
    LOOP AT IT_VEN INTO WA_VEN.
    SPLIT WA_VEN AT '*' INTO WA_VEN-I1
                             WA_VEN-LIFNR
                             WA_VEN-bukrs
                             WA_VEN-ekorg
                             WA_VEN-ktokk
                             WA_VEN-anred
                             WA_VEN-name1
                             WA_VEN-sortl
                             WA_VEN-land1
                             WA_VEN-akont
                             WA_VEN-fdgrv
                             WA_VEN-waers.
    perform open_group.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  WA_VEN-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  WA_VEN-bukrs.
    perform bdc_field       using 'RF02K-EKORG'
                                  WA_VEN-ekorg.
    perform bdc_field       using 'RF02K-KTOKK'
                                  WA_VEN-ktokk.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-LAND1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  WA_VEN-anred.
    perform bdc_field       using 'LFA1-NAME1'
                                  WA_VEN-name1.
    perform bdc_field       using 'LFA1-SORTL'
                                  WA_VEN-sortl.
    perform bdc_field       using 'LFA1-LAND1'
                                  WA_VEN-land1.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-KOINH(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    CNT = 0.
    LOOP AT IT_BANK INTO WA_BANK WHERE J1 EQ WA_VEN-I1.
    SPLIT WA_BANK AT '*' INTO WA_BANK-J1
                              WA_BANK-BANKS
                              WA_BANK-bankl
                              WA_BANK-bankn
                              WA_BANK-koinh
                              WA_BANK-BANKA.
    CNT = CNT + 1.
    CONCATENATE 'LFBK-BANKS( ' CNT ' )' INTO FDT.
    perform bdc_field       using FDT
                                  WA_BANK-BANKS.
    CONCATENATE 'LFBK-BANKL( ' CNT ' )' INTO FDT.
    perform bdc_field       using FDT
                                  WA_BANK-BANKL.
    CONCATENATE 'LFBK-BANKN( ' CNT ' )' INTO FDT.
    perform bdc_field       using FDT
                                  WA_BANK-BANKN.
    CONCATENATE 'LFBK-KOINH( ' CNT ' )' INTO FDT.
    perform bdc_field       using FDT
                                  WA_BANK-KOINH.
    IF cnt = 5.
    cnt = 0.
    perform bdc_dynpro      using 'SAPLBANK' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'BNKA-BANKA'.
    *CONCATENATE 'BNKA-BANKA( ' CNT ' )' INTO FDT.
    *perform bdc_field     using FDT
                                 WA_BANK-BANKA.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'BNKA-BANKA'
                                  'BANK OF INDIA'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '=ENTR'.
    ENDIF.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  WA_VEN-akont.
    perform bdc_field       using 'LFB1-FDGRV'
                                  WA_VEN-fdgrv.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFM1-WAERS'
                                   WA_VEN-waers.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'XK01'.
    ENDLOOP.
    SOME SAMPLE DATA(JUST FOR LEARNING)
    VENDOR DETAILS
    13010000100010001COMPANY1IDES1SAP1DE31000A2INR*   
    13190000100010001COMPANY1SATYAM1CONSULTING1IN31000A2INR*
    24090100000010001MR.AMBANI1RELIANCE1IN31000A2INR*      
    BANK DETAILS FLAT TYPE
    1DE234206630493TSYSTEM1BANK OF MELBOURNE*
    1IN2305866307039TCS1BANK OF ARMENIA*
    1DE453886630765TOSHIBA1BANK OF BERLIN*
    1AU893206639785SHELL1AXIS BANK*
    1CA366373940643YASHODA1BANK OF TORONTO*
    2PK7802374902393CARE1ISLAMIC CONVENTORY BANK*
    2NZ400297494393LG1WELLINGTON NATIONAL BANK*

  • Excel download problem :--- Header data duplicating in unexpected  columns

    Guys, 
       I   am  able  to  download  the  data onto  Excel  with   Header  data  but  the Header data duplicating in unexpected  columns RHS  upto  all  the  line item columns  below....Below  is  partial   excerpt... 
    Please help....
    DATA:
           BEGIN OF excel_wa,
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                pmatn               TYPE  vbap-pmatn,           "Pric Mat
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                prodh               TYPE  vbap-prodh,        "Prod Heir
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF excel_wa,
           BEGIN OF sema_wa,
            posnr            LIKE ws-xxlt VALUE 'STRDFT',
            matnr            LIKE ws-xxlt VALUE 'STRDFT',
            pmatn            LIKE ws-xxlt VALUE 'STRDFT',
            zansicat         LIKE ws-xxlt VALUE 'STRDFT',
            zansigrd         LIKE ws-xxlt VALUE 'STRDFT',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'STRDFT',
            zcurrcstusd      LIKE ws-xxlt VALUE 'STRDFT',
            zzbrndnm         LIKE ws-xxlt VALUE 'STRDFT',
            zqedscgrp        LIKE ws-xxlt VALUE 'STRDFT',
            mstav            LIKE ws-xxlt VALUE 'STRDFT',
            prodh            LIKE ws-xxlt VALUE 'STRDFT',
            kwmeng           LIKE ws-xxlt VALUE 'N00ADD',
            lprc             LIKE ws-xxlt VALUE 'N02ADD',
            sprc             LIKE ws-xxlt VALUE 'N03ADD',
            netpr            LIKE ws-xxlt VALUE 'N02ADD',
            mrgn             LIKE ws-xxlt VALUE 'N00ADD',
          END OF sema_wa,
          BEGIN OF clhd_wa,
            posnr            LIKE ws-xxlt VALUE 'LineItem#',
            matnr            LIKE ws-xxlt VALUE 'Mat#',
            pmatn            LIKE ws-xxlt VALUE 'VC Mat#',
            zansicat         LIKE ws-xxlt VALUE 'AnsiCat',
            zansigrd         LIKE ws-xxlt VALUE 'Grade',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'ValnArea',
            zcurrcstusd      LIKE ws-xxlt VALUE 'Currency',
            zzbrndnm         LIKE ws-xxlt VALUE 'Brand',
            zqedscgrp        LIKE ws-xxlt VALUE 'QE disc',
            mstav            LIKE ws-xxlt VALUE 'Status',
            prodh            LIKE ws-xxlt VALUE 'Prod Heir',
            kwmeng           LIKE ws-xxlt VALUE 'Qty',
            lprc             LIKE ws-xxlt VALUE 'List Pric',
            sprc             LIKE ws-xxlt VALUE 'St.Disc',
            netpr            LIKE ws-xxlt VALUE 'Quote Price',
            mrgn             LIKE ws-xxlt VALUE 'Margin%',
         END OF clhd_wa,
         BEGIN OF hdtxt1_wa,
            vbeln      LIKE ws-xxlt VALUE 'Quotation#',
            kunnr      LIKE ws-xxlt VALUE 'Quote Date',
            kvgr3      LIKE ws-xxlt VALUE 'Rep Date',
            pltyp      LIKE ws-xxlt VALUE 'Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE 'Sold To',
            knuma      LIKE ws-xxlt VALUE 'Ship To',
            datab      LIKE ws-xxlt VALUE 'Top Parent',
            datbi      LIKE ws-xxlt VALUE 'Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE 'Net Sales',
         END OF hdtxt1_wa,
         BEGIN OF hdtxt2_wa,
            vbeln      LIKE ws-xxlt VALUE '',"Quotation#',
            kunnr      LIKE ws-xxlt VALUE '',"Quote Date',
            kvgr3      LIKE ws-xxlt VALUE '',"Rep Date',
            pltyp      LIKE ws-xxlt VALUE '',"Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE '',"Sold To',
            knuma      LIKE ws-xxlt VALUE '',"Ship To',
            datab      LIKE ws-xxlt VALUE '',"Top Parent',
            datbi      LIKE ws-xxlt VALUE '',"Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE '',"Net Sales',
         END OF hdtxt2_wa.
    DATA:
          ivbap      LIKE  STANDARD TABLE OF ivbap_wa,
          imat       LIKE  STANDARD TABLE OF mat_wa,
          icurr      LIKE  STANDARD TABLE OF curr_wa,
          ikonv      LIKE  STANDARD TABLE OF konv_wa,
          ivbpa      LIKE  STANDARD TABLE OF ivbpa_wa,
          ikna1      LIKE  STANDARD TABLE OF kna1_wa,
          iresult    LIKE  STANDARD TABLE OF result_wa,
    *Excel tables
          iexcel     LIKE  STANDARD TABLE OF excel_wa,
          isema_wa   LIKE  gxxlt_s,
          it_sema    LIKE  STANDARD TABLE OF gxxlt_s,
          ihkey_wa   LIKE  gxxlt_h,
          it_hkey    LIKE  STANDARD TABLE OF gxxlt_h,
          iotxt_wa   LIKE  gxxlt_o,
          it_otext   LIKE  STANDARD TABLE OF gxxlt_o,
          iptxt_wa   LIKE  gxxlt_p,
          it_ptext   LIKE  STANDARD TABLE OF gxxlt_p,
          ivkey_wa   LIKE  gxxlt_v,
          it_vkey    LIKE  STANDARD TABLE OF gxxlt_v.
    *Field-Symbols
    FIELD-SYMBOLS:
          <vbap>  LIKE   ivbap_wa,
          <vbpa>  LIKE   ivbpa_wa,
          <mat>   LIKE   mat_wa,
          <sema_wa>,
          <clhd_wa>,
          <hdtxt1_wa>,
          <hdtxt2_wa>.
    *Constants
    CONSTANTS:
          c_auart   TYPE  vbak-auart  VALUE  'AG', "AG = Quotn
          c_parvw1  TYPE  vbpa-parvw  VALUE  'AG',
          c_parvw2  TYPE  vbpa-parvw  VALUE  'WE',
          c_parvw3  TYPE  vbpa-parvw  VALUE  'ZT',
          c_kappl   TYPE  konv-kappl  VALUE  'V',
          c_kschl1  TYPE  konv-kschl  VALUE  'ZBP1',
          c_kschl2  TYPE  konv-kschl  VALUE  'ZNAX',
          c_kschl3  TYPE  konv-kschl  VALUE  'ZNAA',
          c_psize   TYPE  i           VALUE  65535.
    *&      SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE  text-001.
    SELECT-OPTIONS:
        s_vbeln  FOR  ws-vbeln NO INTERVALS NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    *&      AT SELECTION-SCREEN.
    AT SELECTION-SCREEN.
      PERFORM validate_screen_entries.
    START-OF-SELECTION.
      PERFORM gather_quot_data.
      PERFORM gather_mat_data.
      PERFORM gather_ansi_data.
      PERFORM gather_customer_data.
      PERFORM gather_price_data.
      PERFORM process_consolidate_data.
    TOP-OF-PAGE.
      PERFORM write_header_data.
      PERFORM write_column_heading.
    END-OF-SELECTION.
      SET PF-STATUS 'XLS'.
      PERFORM display_output.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'XLS'.
          LOOP AT iresult INTO result_wa.
            CLEAR excel_wa.
            excel_wa-posnr       = result_wa-posnr.
            excel_wa-matnr       = result_wa-matnr.
            excel_wa-pmatn       = result_wa-pmatn.
            excel_wa-zansicat    = result_wa-zansicat.
            excel_wa-zansigrd    = result_wa-zansigrd.
            excel_wa-zcurrvaltnarea = result_wa-zcurrvaltnarea.
            excel_wa-zcurrcstusd = result_wa-zcurrcstusd.
            excel_wa-zzbrndnm    = result_wa-zzbrndnm.
            excel_wa-zqedscgrp   = result_wa-zqedscgrp.
            excel_wa-mstav       = result_wa-mstav.
            excel_wa-prodh       = result_wa-prodh.
            excel_wa-kwmeng      = result_wa-kwmeng.
            excel_wa-lprc        = result_wa-lprc.
            excel_wa-sprc        = result_wa-sprc.
            excel_wa-netpr       = result_wa-netpr.
            excel_wa-mrgn        = result_wa-mrgn.
            APPEND excel_wa TO iexcel.
          ENDLOOP.
          PERFORM set_up_xxl_structures.
          PERFORM download_xxl.
        WHEN OTHERS.
      ENDCASE.
      FREE: ivbpa, imat, ikna1, ivbap, ikonv, iresult, ws.
    *&      Form  set_up_xxl_structures
          text
    FORM set_up_xxl_structures.
      REFRESH: it_otext, it_sema, it_hkey, it_vkey.
      CLEAR:   result_wa, ivbpa_wa, it_otext, ws.
      MOVE  sy-repid  TO ws-title-repid.
      MOVE 'Section'  TO ws-title-reppart.
      WRITE sy-uzeit  TO ws-title-uzeit USING EDIT MASK '__:__'.
      MOVE  ws-title  TO ws-xxl-title.
      READ TABLE iresult INTO result_wa
                         WITH KEY vbeln = s_vbeln-low.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'AG'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-soldto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'WE'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-shipto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'ZT'.
      IF   ivbpa_wa-kunnr EQ space.
        CLEAR ivbpa_wa.
        READ  TABLE  ivbpa INTO ivbpa_wa
                           WITH KEY vbeln = s_vbeln-low
                                    parvw = 'AG'.
      ENDIF.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-tparent.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt1_wa TO <hdtxt1_wa>.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt2_wa TO <hdtxt2_wa>.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = 'Quotation#'.
          WHEN 'Quote Date'.
            <hdtxt2_wa> = 'Quote Date'.
          WHEN 'Rep Date'.
            <hdtxt2_wa> = 'Rep Date'.
          WHEN 'Pric List Typ & Currency'.
            <hdtxt2_wa> = 'Pric List Typ & Currency'.
          WHEN 'Sold To'.
            <hdtxt2_wa> = 'Sold To'.
          WHEN 'Ship To'.
            <hdtxt2_wa> = 'Ship To'.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = 'Top Parent'.
          WHEN 'Sales Org/Sales Dist/CPA'.
            <hdtxt2_wa> = 'Sales Org/Sales Dist/CPA'.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = 'Net Sales'.
        ENDCASE.
        MOVE : 1           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
        CLEAR ihkey_wa.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = result_wa-vbeln.
          WHEN 'Quote Date'.
            WRITE result_wa-erdat TO ws-dat1.
            <hdtxt2_wa> = ws-dat1.
          WHEN 'Rep Date'.
            WRITE result_wa-repdt TO ws-dat2.
            <hdtxt2_wa> = ws-dat2.
          WHEN 'Pric List Typ & Currency'.
            CONCATENATE result_wa-pltyp '/'
                        result_wa-waers INTO <hdtxt2_wa>.
          WHEN 'Sold To'.
            <hdtxt2_wa> = ws-soldto.
          WHEN 'Ship To'.
            <hdtxt2_wa> = ws-shipto.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = ws-tparent.
          WHEN 'Sales Org/Sales Dist/CPA'.
            CONCATENATE result_wa-vkorg  '/'
                        result_wa-bzirk  '/'
                        ivbpa_wa-kvgr3
                        INTO <hdtxt2_wa>.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = result_wa-netwr.
        ENDCASE.
        MOVE : 2           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
      ENDDO.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE sema_wa TO <sema_wa>.
        IF sy-subrc NE 0.
          ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
          IF sy-subrc EQ 0.
            MESSAGE e193 WITH 'OFIL Structures out of synch-Contact IT'.
          ENDIF.
          EXIT.
        ENDIF.
        ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
        IF NOT <sema_wa> EQ 'NOSHOW'.
          ADD 1 TO ws-xxl-tabix.
          MOVE: ws-xxl-tabix   TO isema_wa-col_no,
                <sema_wa>(3)   TO isema_wa-col_typ,
                <sema_wa>+3(3) TO isema_wa-col_ops,
                ws-xxl-tabix   TO isema_wa-col_src.
          APPEND isema_wa TO it_sema.
          IF ws-xxl-tabix LE ws-xxl-vrtkeys.
            MOVE: ws-xxl-tabix TO ivkey_wa-col_no,
                  <clhd_wa>    TO ivkey_wa-col_name.
            APPEND ivkey_wa TO it_vkey.
          ELSE.
            ADD 1 TO ws-xxl-attcols.
            MOVE: ws-xxl-attcols TO ihkey_wa-col_no,
                  10             TO ihkey_wa-row_no,
                  <clhd_wa>      TO ihkey_wa-col_name.
            APPEND ihkey_wa TO it_hkey.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    " set_up_xxl_structures
    *&      Form  download_xxl
          text
         -->P_IHQEXCEL  text
    FORM download_xxl.  "TABLES  iexcel STRUCTURE excel_wa.
      DESCRIBE TABLE iexcel LINES ws-xxl-count.
      ws-xxl-from = 1.
      ws-xxl-to = c_psize.
      DO.
        IF ws-xxl-from GT ws-xxl-count.
          EXIT.
        ENDIF.
        IF ws-xxl-to GT ws-xxl-count.
          MOVE ws-xxl-count TO ws-xxl-to.
        ENDIF.
        ADD 1 TO ws-xxl-suffix.
        MOVE ws-xxl-suffix TO: ws-xxl-name+6(2),
                               ws-xxl-title+36(2).
        CALL FUNCTION 'XXL_FULL_API'
             EXPORTING
                  n_vrt_keys       = ws-xxl-vrtkeys
                  n_att_cols       = ws-xxl-attcols
                  n_hrz_keys       = ws-xxl-hrzkeys
                  data_starting_at = ws-xxl-from
                  data_ending_at   = ws-xxl-to
                  filename         = ws-xxl-name
                  header_1         = space
                  sema_type        = 'X'
                  so_title         = ws-xxl-title
             TABLES
                  data             = iexcel
                  hkey             = it_hkey
                  online_text      = it_otext
                  print_text       = it_ptext
                  sema             = it_sema
                  vkey             = it_vkey
             EXCEPTIONS
                  data_too_big     = 1
                  file_open_error  = 2
                  file_write_error = 3
                  inv_winsys       = 4
                  inv_xxl          = 5.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e193 WITH 'dim_mismatch_data'.
          WHEN 2.
            MESSAGE e193 WITH 'file_open_error'.
          WHEN 3.
            MESSAGE e193 WITH 'file_write_error'.
          WHEN 4.
            MESSAGE e193 WITH 'inv_winsys'.
          WHEN 5.
            MESSAGE e193 WITH 'inv_xxl'.
        ENDCASE.
        ADD c_psize TO: ws-xxl-from,
                                ws-xxl-to.
      ENDDO.
    ENDFORM.                    " download_xxl

    Hello Friend,
    You can use GUI_DOWNLOAD FM to get the excel header if that's the only specific requirement.
    [Download Excel including header |Download Excel including header;
    Hope this helps.
    BR,
    Suhas

  • F-44 Clear Vendor Process Open Items

    Dear All
    Can anyone please tell me how to use transaction code F-44. I want to clear Vendor items. But unable to do it.
    Thanks & Regards
    Kanwaljit

    Hi
    Befor run this transaction ytou have to post vednot invoice through transaction F-43 & Fb60 and then payment through F-53 & F110.
    for example if the amount of invoice 500 and payment is 500 then no need to use f-44 .becasue when you post the payment fully at this time that document automatically cleared.;
    But if the invoice is 500 then payment is 499.95 in this case you use the f-44 .becassue in this case amount is not match and thsi is not showing clear in that case we use f-44
    in this transaction yuo select the vendor account and select the cleraing date
    and clcik on process open item
    then use the transaction
    regards
    roobal

  • AP Vendor Master Data

    HI,
    Working on the AP Vendor Master Data requirement.
    Data is being pulled from LFA1, LFB1, LFBW and LFM1.
    For LFA1 found the datasource 0VENDOR_ATTR and could able to get all the fields from that.
    Can someone please tell what are the related datasources for
    LFB1     -   <Related Datasource>
    LFBW    -  <Related Datasource>
    LFM1     -  <Related Datasource>
    Thanks
    Vandana

    Gaurav..Thanks for your reply.
    Tell me please what is the best procedure to go head with Vendor Master details.
    Fields are from 3 or 4 different datasources (0VENDOR_ATTR, 0VEN_COMPC_ATTR, 0VEN_PURORG_ATTR)
    and some more fields from WYTE table (Vendor Partner).
    1 - Shall i use all these different datasources to extract the data in BW ? or
    2 - Create a zeneric datasource and include all these tables from different datasources and extract into BW?
    Please let me know when you get a chance. This is first major implementation and i'm quite to SAP BW.
    Thanks
    Vandana

  • In  BDC how you handled header data and item data

    In  BDC how you handled header data and item data

    Raja,
    Can you be more clear ?
    Usually you load the header data one and then loop at the item data and then load the item data.
    This example should help you.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • MM: MIR7: How to display vendor master data "bank code" in the invoice doc.

    Hi all,
    I would like to display the bank code of the vendor in the header screen of the invoice. At the moment only the name of the bank is visible. Is there a possibility in the customizing to modify the screen of transaction code MIR7? I do not want to make a modification to the SAP Standard.
    Many thanks in advance.
    Regards,
    Max

    Hi,
    You can use custom validation program (Z*) by copying standard validation (RGGBR000) program.
    Modify the validation program to check table vendor master data.
    After that, you need to assign this  custom validation program to GBLR application area in GCX2.
    Thanks

Maybe you are looking for

  • Hp3525 Light print, all colors.Washed out look.

    I was working on a light print issue on an hp3525. I tried pretty much everything. cleaned all contacts, tried different cartridges, cleaned the scanners,which are a pain to remove. The problem turned out to be a bad connection on the dc controller,

  • Tables used in LO extractors

    Hi Can anyone point me to a document that shows the tables used in a Logistics extractor?  Even If I get a few, that would still be ok. I used to think I could get this by looking at the Comm Structure and removing MC from the name but this isn't the

  • Oracle applications in reg to reports

    Hi The Issues it was like this when Concurrent Request Successfull Completed Without any errors But output File is not Generated in Oracle Apps 11.5.9 Environment. When we checked in log file it showing Error Like this FRM-41839:Disk I/I error on Tem

  • Create Log for PL/SQL

    Hi all, Is it store precedure create any log file when I do insert or delete in my procedure? Thank in advanc. eg. create my procedure begin insert into mytable()select * from employee; delete from mytable where id < 100; end

  • IPhoto 9.4.3 suddenly won't open unless it's updated

    My iPhoto version shows in the Application folder as 9.4.3. I try to open it and get rerouted to the App Store to update it. When I try to update it I get a dialogue box that reads: "This update is not available for this Apple ID either because it wa