Tax details not geting populated

Hi Folks,
I have a problem in populating tax details.can anyone here please let me know where I am going wrong in the code.The last  butone field is caluculation and can be ignored for the time being.
REPORT  ZMMEXCISETEST                           .
*Tables.
TABLES : ekbe,
         rbkp,
         rseg,
         bkpf,
         bset,
         lfa1,
         makt.
*Declaration for ALV.
TYPE-POOLS: slis.
DATA : itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA : itrepid TYPE sy-repid.
itrepid = sy-repid.
DATA : itevent TYPE slis_t_event.
DATA : itlistheader TYPE slis_t_listheader.
DATA : walistheader LIKE LINE OF itlistheader.
DATA : itlayout TYPE slis_layout_alv.
DATA : top TYPE slis_formname.
DATA : itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA : itsort1 TYPE slis_sortinfo_alv.
DATA : itprintparams TYPE slis_print_alv.
DATA : itvariant TYPE disvariant.
DATA : date1 LIKE rbkp-budat,
       date2 LIKE rbkp-budat,
       string1(65) TYPE c,
       title(65) TYPE c.
DATA:L_BELNR1 TYPE BKPF-BELNR,
     L_AWKEY1 TYPE BKPF-AWKEY.
*Internal table Declarations.
TYPES: BEGIN OF ty_itfinal,
          sl_no   TYPE sy-tabix,     " FOR SERIAL No.
          belnr   TYPE rbkp-belnr,   " Material Doc. No.
          budat   TYPE rbkp-budat,   " Posting Date in the Document
          lifnr   TYPE rbkp-lifnr,   " Vendor Code
          xblnr   TYPE rbkp-xblnr,   " Supplier Document Number
          bldat   TYPE rbkp-bldat,   " Document Date
          kursf   TYPE rbkp-kursf,   "
          buzei   TYPE rseg-buzei,   " miro line item
          ebeln   TYPE rseg-ebeln,   " po no
          ebelp   TYPE rseg-ebelp,   " PO line item
          matnr   TYPE rseg-matnr,   " part no
          bwtar   TYPE rseg-bwtar,   " valuation type
          menge   TYPE rseg-menge,   " quantity
          wrbtr   TYPE rseg-wrbtr,   " value of goods
          lfbnr   TYPE rseg-lfbnr,   "
          wrbtr_r TYPE rseg-wrbtr,   " Rate
          wrbtr_v TYPE rseg-wrbtr,   " Value of Goods
          bewtp   TYPE ekbe-bewtp,   " PO history category
          budat1  TYPE ekbe-budat,   "
          hwste_c TYPE bset-hwste,   " ED/CVD(Tax Amount in Local Currency)
          hwste_e TYPE bset-hwste,   " E.Cess(Tax Amount in Local Currency)
          hwste_s TYPE bset-hwste,   " Snhe.Cess(Tax Amount in Local Currency)
          accno   TYPE bkpf-belnr,   "
          BELNR1  TYPE BKPF-BELNR,
          AWKEY   TYPE BKPF-AWKEY,
          name1   TYPE lfa1-name1,   " vendor name
          maktx   TYPE makt-maktx,   " Material Description
      END OF ty_itfinal.
DATA: itfinal TYPE ty_itfinal OCCURS 0 WITH HEADER LINE.
TYPES : BEGIN OF ty_itab1,
          belnr   LIKE rbkp-belnr,    " Material Doc. No.
          budat   LIKE rbkp-budat,    " Posting Date in the Document
          lifnr   LIKE rbkp-lifnr,    " Vendor Code
          xblnr   LIKE rbkp-xblnr,    " Supplier Document Number
          bldat   LIKE rbkp-bldat,    " Document Date
          kursf   LIKE rbkp-kursf,    " Ex.Rate
       END OF ty_itab1.
DATA :itab1 TYPE ty_itab1 OCCURS 0 WITH HEADER LINE.
*Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS:     p_bukrs LIKE rbkp-bukrs OBLIGATORY.
PARAMETERS:     p_werks like rseg-werks  OBLIGATORY.
SELECT-OPTIONS: s_budat FOR  rbkp-budat OBLIGATORY.
PARAMETERS    : p_gjahr LIKE rseg-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
date1 = s_budat-low.
date2 = s_budat-high.
PERFORM getdata.
PERFORM alv.
*&      Form  GETDATA
      text
-->  p1        text
<--  p2        text
FORM getdata .
*Invoice Header
  SELECT belnr
         budat
         lifnr
         xblnr
         bldat
         kursf
         FROM rbkp
         INTO TABLE itab1
         WHERE gjahr = p_gjahr.
  IF sy-subrc NE 0.
    MESSAGE 'No Values.' TYPE 'S'.
  ELSE.
    LOOP AT itab1.
      IF itab1-budat NOT IN s_budat.
        DELETE itab1.
      ENDIF.
    ENDLOOP.
  ENDIF.
*Invoice Item.
  LOOP AT itab1.
    MOVE-CORRESPONDING itab1 TO itfinal.
    SELECT buzei
           matnr
           bwtar
           menge
           wrbtr
           lfbnr
           XBLNR
           FROM  rseg INTO CORRESPONDING FIELDS OF itfinal
           WHERE belnr = ITAB1-belnr.
    ENDSELECT.
    IF itfinal-lfbnr IS INITIAL.
      SELECT belnr
             budat
             FROM ekbe INTO (itfinal-lfbnr, itfinal-budat1)
             WHERE belnr = itab1-belnr.
      ENDSELECT.
    ENDIF.
*P.O. History
    SELECT ebeln
           ebelp
           bewtp
           FROM ekbe
           INTO CORRESPONDING FIELDS OF itfinal
           WHERE belnr = itab1-belnr.
    ENDSELECT.
*<b>Accounting Doc.No.
    SELECT BELNR
           AWKEY
           FROM bkpf INTO (ITFINAL-BELNR1,itfinal-aWKEY)
           WHERE blart = 'RE' AND
                 GJAHR = P_GJAHR AND
                 BUKRS = P_BUKRS AND
                 BUDAT IN S_BUDAT.</b>
*Vendor Details.
    SELECT name1
           FROM lfa1 INTO (itfinal-name1)
           WHERE lifnr = itfinal-lifnr.
    ENDSELECT.
*Material Description.
    SELECT maktx
           FROM makt INTO (itfinal-maktx)
           WHERE matnr = itfinal-matnr.
    ENDSELECT.
    ENDSELECT.
APPEND ITFINAL.
ENDLOOP.
<b>LOOP AT ITFINAL.
*Excise Duty and Ed.Cess.
    SELECT HWSTE
           FROM BSET INTO (ITFINAL-HWSTE_C)
           WHERE BELNR = ITFINAL-BELNR1 AND
                 GJAHR = P_GJAHR AND
                 BUKRS = P_BUKRS AND
                 KSCHL = 'JMO1' AND
                 KSCHL = 'JMO2'.
    ENDSELECT.
    SELECT HWSTE
           FROM BSET INTO (ITFINAL-HWSTE_E)
           WHERE BELNR = ITFINAL-BELNR1 AND
                 BUKRS = P_BUKRS AND
                 GJAHR = P_GJAHR AND
                 KSCHL = 'JEC1' AND
                 KSCHL = 'JEC2'.
    ENDSELECT.
    MODIFY ITFINAL.
ENDLOOP.</b>
*Filtering the Internal Table w.r.t P.O History Category.
  LOOP AT itfinal.
    IF itfinal-bewtp EQ 'E'.
      DELETE itfinal.
    ENDIF.
    itfinal-wrbtr_v = itfinal-wrbtr * itfinal-kursf.
    itfinal-wrbtr_r = itfinal-wrbtr_v / itfinal-menge.
    MODIFY itfinal.
  ENDLOOP.
ENDFORM.                    " GETDATA
*&      Form  ALV
      text
-->  p1        text
<--  p2        text
FORM alv .
  IF itfinal[] IS INITIAL.
    MESSAGE 'No Values exist for the Selection.' TYPE 'S'.
    STOP.
  ENDIF.
  LOOP AT itfinal.
    itfinal-sl_no = sy-tabix.
    MODIFY itfinal.
  ENDLOOP.
  DEFINE j_fieldcat.
    itfieldcat-fieldname = &1.
    itfieldcat-col_pos = &2.
    itfieldcat-seltext_l = &3.
    itfieldcat-do_sum = &4.
    itfieldcat-outputlen = &5.
    itfieldcat-edit = &6.
    append itfieldcat to itfieldcat.
    clear itfieldcat.
  END-OF-DEFINITION.
  j_fieldcat 'SL_NO' '' 'SL. NO' '' 03 ''.
  j_fieldcat 'LFBNR' '' 'MATERIAL DOC.No.' '' 10 ''.
  j_fieldcat 'BUDAT' '' 'POSTING DATE.' '' 08 ''.
  j_fieldcat 'LIFNR' '' 'VENDOR' '' 10 ''.
  j_fieldcat 'NAME1' '' 'VENDOR NAME.'  '' 35  ''.
  j_fieldcat 'XBLNR' '' 'SUPPLIER DOC.No.' ' ' 10 ''  .
  j_fieldcat 'BLDAT'   '' 'ACCOUNTING DOC.DATE' '' 08 ''.
  j_fieldcat 'MATNR' '' 'PART No.' '' 18 ''.
  j_fieldcat 'MAKTX' '' 'DESCRIPTION' '' 40 '' .
  j_fieldcat 'MENGE' '' 'QUANTITY RECEIVED' '' 08 ''.
  j_fieldcat 'KURSF' '' 'ECHANGE RATE' '' 13 ''.
  j_fieldcat 'WRBTR_R' '' 'RATE' '' 13 ''.
  j_fieldcat 'WRBTR_V' '' 'VALUE OF GOODS' '' 13  ''.
  j_fieldcat 'HWSTE_C' '' 'ED/CVD' '' 13 ''.
  j_fieldcat 'HWST_E' '' 'EDU.CESS' '' 13 ''.
  j_fieldcat 'HWST_S' '' 'S&HE.CESS' '' 13 ''.
  j_fieldcat 'BWTAR' '' 'VALUTAION TYPE' '' 10 ''.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = itlayout
       i_callback_user_command =  ' '
        i_callback_top_of_page  = 'TOP'
        it_fieldcat             = itfieldcat[]
        i_save                  = 'A'
     is_variant              = ITVARIANT
        it_events               = itevent[]
     is_print                = ITPRINTPARAMS
        it_sort                 = itsort[]
      TABLES
        t_outtab                = itfinal
        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.                    " ALV
*&      Form  TOP
    Top of page for ALV Report
FORM top.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
     EXPORTING
        i_list_type           = 0
     IMPORTING
        et_events             = itevent
EXCEPTIONS
  LIST_TYPE_WRONG       = 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.
  string1 = 'Excise Input Details '.
  CONCATENATE string1 p_werks date1 'to' date2 INTO title SEPARATED BY space.
  walistheader-typ = 'H'.
  walistheader-info = title.
  APPEND walistheader TO itlistheader.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary      = itlistheader
    I_LOGO                   = ''.
    I_END_OF_LIST_GRID       =
   ENDIF.
  CLEAR itlistheader.
ENDIF.
ENDFORM.                    "TOP
Thanks,
K.Kiran.
Message was edited by:
        Kiran K

Hi,
Use select single in the select statement.
Try using modify before endselect.
Thanks,
Sriram Ponna.

Similar Messages

  • In my work  flow Invoice Details not geting  when Dispute case created?

    Hai Experts,
                          Im Working on Dispute case Workflow in FSCM module , I Created custom workflow for that ,
    when ever Disputecase created notification send to Processor and Coordinator for that i created one Zclass
    write the one of the that Zclass method for sending  the mail to processor and coordinator for those mail Id's,
    Its working fine but the problem is on that mail i have to send the Invoice details also ,
    for that im using the fm  'UDM_GET_BOR_OBJECT_KEY_INVOICE ' this FM not geting the data when dispute case is created,
    its working in foreground and background, but the problem is in workflow it  is not geting the invoice details.
    please help me on this,,,
    thanks in adv..

    Hello,
    "I Debug the FM, its throughs the Error
    'No Configuration for the wrokflow Wfno version 0000'."
    I doubt very much that the FM is showing that error. I assume you mean the workflow log.
    The step that calls the task that calls the method that calls that FM, is that the one with that error message?
    First check that the FM works in SE37 with the same inputs as when called from the workflow, and if it gives the expected output.
    Try replacing that step with a different one to make sure there's no problem with the workflow itself. Make sure the workflow is activated without errors and do SWU_OBUF.
    regards
    Rick Bakker
    hanabi technology

  • Users details not getting populated in the portal tables..

    Hi,
    We have implemented single sign on (SSO) and we do not create users in the portal as user/pwd come from OID.
    Now becoz of this the portal tables are not getting populated.I require that all the users of the OID to be populated in the portal tables. How can I do it.I depserately require it.

    You can use the function wwsec_api.activate_portal_user to create the shadow records in the portal repository.
    Ref. : http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/wwsec_api.html

  • Purchase Order line item tax details not in IDoc ORDERS02

    We are on ECC6 and using IDoc ODERS02, when viewing the purchase order in me23n, taxes are visible on the line item under the invoice tab. When we view the same purchase order via the IDoc that was created, the line item taxes are not being displayed in segments E1EDP04 and E1EDP05.
    Is there some configuration we need to do to get the taxes info into the IDoc?

    Hi Bill,
    I think only price elements which have been set to "to be printed" in Customizing will be included into the Idoc.
    Just a remark: ORDERS02 is an "historical" Idoc; ORDERS05 is the appropriate one for ECC6 (but this has nothing to do with your problem).
    Regards,
    John.

  • Why is the FROM field in Task Details not always populated on in-flight BPs

    On a BP, the Task Details section contains a "From:" and a "To:" field.
    1. If I am the assignee, the From and To fields are populated.
    2. If I am NOT the assignee, the From field is empty, but the To field is populated. The behavior is the same whether the assignee accepted the task or not.
    This becomes inconvenient, for example, on a coordination step with multiple inflows and outflows. If the From field were always populated, I could readily get a sense of the context of the current step without fishing through the timestamps of the Process Details, particularly if this step is revisited multiple times.
    Granted, it's minor, but our users have noticed. Is there any reason for this?

    Thank you for your reply.  I changed the error handling as you suggested on the 2nd lookup to redirect to unmatched rows.  Now I get all greet.  I don't have the conditional split as in your diagram.  But also, nothing appears to have
    happened in the DB.  Aren't the rows in my text file supposed to be added to the FactCurrencyRate table?
    How do I get a conditional split?
    Rich P
    OK, sorry I forgot to reply you back.
    Conditional Split was just dummy task. Ignore it.
    Manipulate the data in such way that you get matching records.
    Inside Source, for first 2 rows I put the dates which are available in DimDate.
    1.00010001,ARS,7/1/2005 0:00,0.99960016
    1.00010001,ARS,2/5/2006 0:00,1.001001001
    1.00020004,ARS,9/5/2001 0:00,0.99990001
    1.00020004,ARS,9/6/2001 0:00,1.00040016
    1.00050025,ARS,9/7/2001 0:00,0.99990001
    1.00050025,ARS,9/8/2001 0:00,1.001001001
    Then in OLE DB Destination, I loaded the rows to TestFactTable.
    (Now, you don't even need NO MATCH OUTPUT as there are matching records here)
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • Tax Field not getting populated

    Hi SAP SD Gurus
    I am calculating tax with condition type MWST. In the pricing procedure the tax is getting calculated. The Tax Amount is also getting deducted from the Net Amount. But, on the Conditions Tab Page of Item Details, it is not displaying the Tax Field (KOMP-MWSBP) below the Net (KOMP-NETWR) Field.
    Thanks & Regards.

    Hi,
    Plz check if you have input the plant name in the shipping tab at item level.
    Without putting the plant name,tax (MWST) will not be visible in the conditions tab because there is a routine set in the pricing procedure against a tax condition.
    Reward points if it helps.
    Regards
    Karan

  • Tax details not appearing in the purchase order

    Dear Gurus,
                  Am using tax procedure TAXINN. and i have maintained the respective values for the condition type even though while creating purchase order am trying to click the TAXES button but its not simulating the values that pop up taxes screen is not appearing. but all the CIN settings maintained correctly in J1ID also the values maintained correctly..
    any other setting is required...
    Please advise me..
    Regards
    Anand

    Check tax code is assigned to company code in CIN SPRO settings.

  • Taxes are not showing in PO for a plant

    Hi,
    We have a Purchase Order with Plant1 and using a Tax Code with CST Condition. In the PO Item Details, the Taxes are displaying when I click the 'Taxes' button in the 'Invoice' Tab. But, when I use the same details (all details, including Tax Code) to create another PO for Plant2 (Plant1 &2 belong to same company code), the Tax Details are not displaying. Clicking on the 'Taxes' button had no effect.
    The Tax Code is maintsained correct and the Conditon record also maintained at Country / Tax Code level (checked in FV13)
    Why the Tax details not showing for Plant 2 ? Please give a solution..
    regards
    Arun.

    If you have assigned the tax code to the company code under SPRO>Logistics general> Tax on goods movement
    It should work for both the plants unless  that plant is not under that company code.
    Are all the tax codes behaving in the same way or its only a particular tax code.
    Regards
    Sangeeta

  • When the user press the button Calculate Tax (see attached doc) and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.

    When the user press the button Calculate Tax  and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.
    All setup looks fine.
    Please let me know what can be done on this?
    Regards,
    Peu

    HarryAustralia wrote:
    I recently updated my ipad wifi only to the new ios 6.1.2 and initially I had the auto cover lock option which can be seen in the Generals tab, but then it stoped working!! Before the update, the auto cover lock worked fine. So after trying all the options, I then did a complete reset on the ipad and now its gone all together from the General tab!! I can no longer see the "auto cover lock" option.
    The iPad cover lock is for when you use a cover with magnets in it to lock and unlock the iPad when you close the cover or open it. Try running a refrigerator magnet along the sides of the iPad and see if that trips the iPad Cover Lock back into the settings.
    That is not the same thing as the iPad Auto Lock setting which allows you to set an allotted time before the iPad goes to sleep.
    You can try resetting all settings to see if the Auto Lock feature retinrs to the iPad.
    Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. This can be a little time consuming re-entering all of the device settings again.

  • Employee tax details are not showing up in Payslip...

    Hi Experts,
    in my project when we are  generating payslip Tax details are not showing up in that.I have checked with RT , the amount is correctly showing in RT.How can i resolve the problem.Please advice me.
    Regards,
    Sai.

    Hi Manoj,
    Thanks for the reply.How can check weather the wagetypes are added or not addeded in PE51.If not added what should i do?
    Thanks in advance.
    SAI

  • Data in detailed block is not getting populated

    I have created 3 blocks-: block1, block2 and block3
    I have created two relations
    1st - between block1 and block2 (block1 is master and block2 is detailed)
    2nd - between block1 and block3 (block1 is master and block3 is detailed)
    Now, on the canvas I place a text item block1.text_item1 (involved in relation) from block1,
    and a text item block3.text_item3 from block3 (this too involved in relation) block3
    when I execute the form and I query on master block that is on block1.text_item1, data in detail block that is in block3.text_item3 do not get populated.
    Now I place a text item block2.text_item2(involved in the relation) from block2 on the same canvas
    Now I again execute the form and query on the master block that is on block1.text_item1, this time data in all three blocks got populated.
    I want to place items only from block1 and block3 at present. Could you please tell me how can I do this?
    Regards

    No, I am not getting such error. Only data is not getting populated.
    If I remove item from block3 and place item from block2, then also the data is getting populated.
    Item from block1+ Item from block2 -> Data is getting populated
    Item from block1+ Item from block3 -> Data is not getting populated
    Item from block1+ Item from block2+Item from block3 -> Data is getting populated
    Regards

  • Not getting the tax details in me23n using custom smartform

    Hi to all,
       I am useing bapi to get the details of service order and printing the details in my custom smartform which is assigned in me23n. My problem is i am getting all the details like line item and all related but not the tax details. I need to print the net amount which is net amount + tax . Can any one help me in this regards.

    Use function module   CALL FUNCTION 'CALCULATE_TAX_ITEM'
          EXPORTING
           dialog                    = lc_n
           display_only              = lc_x
           i_taxcom                  = lwa_taxcom
          IMPORTING
        E_NAVFW                   =
           e_taxcom                  = lwa_taxcom
        E_XSTVR                   =
           nav_anteil                = lv_taxamt
         TABLES
           t_xkomv                   = lt_komv
         EXCEPTIONS
           mwskz_not_defined         = 1
           mwskz_not_found           = 2
           mwskz_not_valid           = 3
           steuerbetrag_falsch       = 4
           country_not_found         = 5
           OTHERS                    = 6
        IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    LT_KOMV will return the tax related data.
    Nabheet

  • CRM To ECC Sold to party Communication Details Not populated in ECC

    Hi All
    i have one problem when we create sales order through crmd_order we need to give sold to party and ship to party numbers suppose like
    8000002166 for both and status i keep as order created and in partner tab i i seem all partner funtions(sold to, ship to ,bill to, payer)with 8000002166
    in header overivew i given posting date as feature date like 30-09-2013 then i try to save this order.
    the order generated sucussfully but problem is i am not getting sold to party details in ECC when i check VA03 And open cretaed order in CRM and clicking on sold to party and i seem details for this but i am not getting communication details like telephone number and email id extension number.
    for this sold to party we already maintained all communication details in CRM.When i open this sold to party BP i am able to see all details
    didnt understand why these details not replicated to ECC?
    We implemented one custom class there we implemented badi.
    IF_EX_CRM_DATAEXCHG_BADI~CRM_DATAEXCH_AFTER_BAPI_FILL
    i am not getting BAPI ADDRESS Table values into  CT_BAPIADDR1
    how can i send communciation details to ECC For sold to party?
    The code part we follow like below
    TYPES : BEGIN OF t_otc,                                                        " Type to create a table with the given columns.
              bpid            TYPE bu_partner,                                       " variable of store processed business partner ID's
              otcid           TYPE bu_partner,                                       " variable of store processed OTC ID's
              otcguid         TYPE bu_partner_guid,                                  " variable of store processed OTC GUID's
              address         TYPE bapibus1006_address,
              tel1_numbr      TYPE ad_tlnmbr1,
              tel1_ext        TYPE ad_tlxtns1,
              e_mail          TYPE ad_smtpadr,
              END OF t_otc.
    *&                             V A R I A B L E S                         &*
      DATA : lv_bp_payer      TYPE bu_partner,                                       " Variable To Cast the payer Id into BU_Partner data type.
             lv_partner_fct   TYPE crmt_partner_fct,                                 " Variable To Store Partner Function Number.
             lv_partner       TYPE bu_partner,                                       " Variable To Store Current Business Partner ID.
             lv_process_type  TYPE crmt_process_type,                                " Variable to Store process type.
             lv_sales_org     TYPE crmt_sales_org,                                   " Variable to store sales org. name of order
             lv_dis_channel   TYPE crmt_distribution_channel,                        " Variable to store distribution channel of order.
             lv_division      TYPE crmt_division,                                    " Variable to store division of sales org. data.
             lv_role          TYPE comt_partner_parvw,                               " Variable to store retrieved role from FM.
             lv_role_value    TYPE parvw,                                            " Variable to store the role value of Partner Functions.
             lv_otc_guid      TYPE bu_partner_guid,                                  " Variable to store OTC GUIDs for the OTC ID.
             lv_otc_id        TYPE kunnr.                                            " Varaible to OTC ID revocered from Table.
      DATA: lv_busspartner           TYPE bapibus1006_head-bpartner,
            lw_central_data          TYPE bapibus1006_central,
            lw_centraldata_person    TYPE bapibus1006_central_person.
    *&                             W O R K A R E A S                         &*
      DATA : lw_address       TYPE bapibus1006_address,                              " Work Area to store address recovered for BPID.
    *Start of code change for Defect 904 Fix
             lw_tel           TYPE bapiadtel,
             lw_email         TYPE bapiadsmtp.
    *End of code change for Defect 904 Fix
    *&                          INTERNAL TABLES                              &*
      DATA : li_otc           TYPE TABLE OF t_otc,                                   " Internal Table to Store the OTC IDs and BPS.
             li_values        TYPE          zconst_values_t,
    *Start of code change for Defect 904 Fix
             li_tel           TYPE STANDARD TABLE OF bapiadtel,
             li_email         TYPE STANDARD TABLE OF bapiadsmtp.
    *End of code change for Defect 904 Fix
    *                       F I E L D - S Y M B O L S                         *
      FIELD-SYMBOLS: <f_orderadm>      TYPE bad_orderadm_h_mess,
                     <f_otc>           TYPE t_otc,                                   " Field-Symbol to Read the OTC TABLE data.
                     <f_partner>       TYPE bad_partner_mess,                        " Field-Symbol of Partner Table For Looping.
                     <f_bapiparnr3>    TYPE bapiparnr3,                              " Field-Symbol to Store The Row of BAPIPARNR3.
                     <f_bapiaddr1>     TYPE bapiaddr1,
                     <f_orgman>        TYPE bad_orgman_mess,                         " Field-Symbol to Read the ORGMAN table.
                     <f_values>        TYPE zcr_const_values.
    *&                             C O N S T A N T S                         &*
      CONSTANTS :  lc_program_name     TYPE progname      VALUE 'ZOTC',
                   lc_param_payer      TYPE paramname     VALUE 'PAYER',              " Constant to Store Payer Parameter name.
                   lc_ref_kind         TYPE crmt_object_kind VALUE 'A',
                   lc_req_1            TYPE zrequest_no VALUE '1',
                   lc_req_2            TYPE zrequest_no VALUE '2'.
    * Retrieving the general and Common Data for a Order.
      READ TABLE it_bus_trans_msg-orderadm_h INDEX 1 ASSIGNING <f_orderadm>.
      IF sy-subrc EQ 0.
        lv_process_type = <f_orderadm>-process_type.
      ENDIF.
    * Reading the Orgnisation Details from ORGMAN Table.
      READ TABLE it_bus_trans_msg-orgman WITH KEY ref_kind = lc_ref_kind ASSIGNING <f_orgman>.
      IF sy-subrc EQ 0.
    *   Storing the Sales Organisational Data to find the OTC_ID.
        lv_sales_org = <f_orgman>-sales_org.
        lv_dis_channel = <f_orgman>-dis_channel.
        lv_division = <f_orgman>-division.
      ENDIF.
    * Retrieving the partner function number for the payer by giving requirement no 2 and rule no 1.
      CALL FUNCTION 'ZCRAN_GET_CONSTANT_VALUES'
        EXPORTING
          pi_program_name = lc_program_name
          pi_req_no       = lc_req_2
        IMPORTING
          po_const_values = li_values.
      IF sy-subrc <> 0.
        RETURN.
      ENDIF.
    * Reading the value for the constant with the name as PAYER.
      READ TABLE li_values WITH KEY param_name = lc_param_payer ASSIGNING <f_values>.
      IF sy-subrc NE 0.
        RETURN.
      ENDIF.
    * Retrieving the Partner ID for the PAYER.
      READ TABLE it_bus_trans_msg-partner ASSIGNING <f_partner> WITH KEY ref_partner_fct = <f_values>-constant_value.
      IF sy-subrc EQ 0.
    *   Storing the current partner ID.
        lv_bp_payer = <f_partner>-ref_partner_no.
      ENDIF.
      REFRESH li_values.
    * Retrieving the Partner Function Number which are to be checked for replacing with the OTC ID with request no 1 and rule no 01.
      CALL FUNCTION 'ZCRAN_GET_CONSTANT_VALUES'
        EXPORTING
          pi_program_name = lc_program_name
          pi_req_no       = lc_req_1
        IMPORTING
          po_const_values = li_values.
      IF sy-subrc <> 0.
        RETURN.
      ENDIF.
    * Transferring the constant value to our table for Partner Fucntion.
      LOOP AT li_values ASSIGNING <f_values>.
    * Read Partner table for Header data and the reference partner function retrieved.
        READ TABLE it_bus_trans_msg-partner WITH KEY ref_kind = lc_ref_kind ref_partner_fct = <f_values>-constant_value ASSIGNING <f_partner>.
        IF sy-subrc EQ 0.
    *     Storing Current Partner Function.
          lv_partner_fct = <f_partner>-ref_partner_fct.
    *     Storing Current Partner No.
          lv_partner = <f_partner>-ref_partner_no.
    *     Retrieving the Partner Role (R/3) for the current partner function of CRM.
          CALL FUNCTION

    The problem is in the Lotus Notes security level, not in SAP.

  • Tax columns to be populated in ra_interface_lines_all table in Inbound Interface???

    Hi All,
    We are upgrading EBS from 11i instance to R 12.1.3. There is inbound interface for Recevibles transactions which fetches data from a data file and imports invoices after validation.
    In 11i, tax_code column in ra_interface_lines_all was populated to import the tax details. But, in R12 tax_code column is not used. Can anyone tell me which columns we need to populate in ra_interface_lines_all table for tax details, i can see there are many tax related columns. I am deriving tax details from zx_rates_b table.
    Which column should be used from this table as a input in tax_code(or other column) in ra_interface_lines_all.??
    Thanks
    Swapnil K.

    Hi Swapnil,
    For Tax, value to be taken from ZX_TAXES_B.TAX
    For TAX_STATUS_CODE, value to be taken from ZX_STATUS_B.TAX_STATUS_CODE
    For TAX_RATE_CODE, value to be taken from ZX_RATES_B. TAX_RATE_CODE
    For further details on the mapping refer to the oracle documentation from below reference ...
    Description and Usage of Fields in RA_INTERFACE_LINES Table (Doc ID 1195997.1)
    Regards,
    Ivruksha

  • Amount not getting populated in me21n

    hi,
    amount is not getting populated for the condition type in the conditions tab of me21n.

    Hi
    Have you maintained Info record with conditons? Please write in detail.
    regards
    Srinivas

Maybe you are looking for

  • FireWireStorageDeviceSpecifics.kext was installed improperly error message.

    I get an error message when installing some software. It say's FireWireStorageDeviceSpecifics.kext was installed improperly and cannot be used. Where do I get the most up to date version of this for OSX Snow Leopard 10.6.8 and how do I install it pro

  • Cisco 6004 VPC issue

    Hi Friends, We are experiencing issue in Cisco 6004 while creating  VPC. We are unable to configure VPC because upon enabling the feature  it is showing error. Request if anybody can help us here. TEST(config)# feature vpc Error: while enabling/disab

  • Thunderbolt Compatible with iMac 2009 via MDP

    Just wanted to throw it out there for anybody who's curious that my Thunderbolt MBA (mid-2011) is successfully able to use my iMac (late 2009) as an external display even though it isn't Thunderbolt equipped. I was always wondering and finally know t

  • Editing heap size...

    Hi All, This may sound like plain question so I apologize: i am running Weblogic 11g and am wanting to lower the JVM size from 256 to 128. On the startWeblogic.sh, I edited and added: ${JAVA_HOME}/bin/java ${JAVA_VM} -version if [ "${WLS_REDIRECT_LOG

  • BDLS for table BBP_PDATT not updated

    Hi, Would like to check if BDLS will update the logical system for table BBP_PDATT? We've run BDLS for our system.all logical system have been updated except table BBP_PDATT? Is it meant to be like that? Thanks!