Need ABAP code for the below Services requirement

Hi,
We have a requirement to show all the services for a particular Purchase order number.For this I built a view on 2 tables ESLL and EKPO.Now based on the below logic I need to bring the services for the Purchase order..
1.Enter PO number,item no. and Doc category in EKPO and find the Pack no.
2.Now take the Pack no. of EKPO and give in ESLL and find the Sub pack no.
3.Now take this Subpack no. and Give this sub pack as Pack no. in ESLL
4.This will be the Service entry record for that PO number.
Can any one Please suggest me to how to write the ABAP code for the above logic.
Thanks & Regards,
Dinakar

Hi Dinaker,
Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
Thanks,
SAPBWI

Similar Messages

  • ABAP Routine code for the below logic

    Hello BW Experts ,
    I need to write a complex ABAP routine in BW .
    Following is the detail explaination .
    Can anyone tell me the ABAP code for the below logic?
    It would be a greate help as I am unable to do this
    since last two days.
    WBS Elements are maintained at  IOS and  Warranty levels in R/3 side.
    The IOS WBS is a top level of WBS element and below that the Warranty WBS level.
    The IOS and Warranty WBS elements can be differentiated by means of priority field.
    When priority = i   , WBS Element is known as  IOS Level WBS Element and
    When  priority = Y the WBS element is known as Warranty WBS element.
    The Equipment Number is maintained compulsorily at IOS Level WBS elements only.
    It is not maintained at  Warranty WBS Element.
    But the Cost is maintained at Warranty WBS Elements.
    In BW I need all Warranty WBS ( priority = Y) along with their cost figures and Equipment Numbers.
    But as the Equipment Number is not maintained compulsorily at Warranty WBS level we have asked to
    Copy it from  IOS WBS ( priority = i ) and assign it to Warranty WBS level ( priority = Y ).
    So I have included the Equipment Number in the ODS and in update rules I need to write the routine for it as
    per the above logic.
    The Equipment Number is coming from Master data of  WBS Element.
    The WBS element master data we are loading in BW .
    Also the same WBS Element transaction data is coming from the transaction data data source in BW.
    Following fields / infoobjects and the table names in BW :
    1. Equipment Number : /BIC/ZEQUIPMNT  and table name /BIC/MZWBS_ELEM.
    2. WBS Element       : ZWBS_ELEM  is coming from transaction data data source as well as master data.
                                     In ODS update rules it is coming from  transaction data data source Comm_structure-ZWBS_ELEM.
                                     Also we are loading separetly the master data for ZWBS_ELEM.
                                     The  ZEQUIPMNT is an attribute of ZWBS_ELEM.
    3. Priority                :  PRIORITY     and table name /BIC/MZWBS_ELEM.
                                      The info object name for Priority is 0Priority but in master data table /BIC/MZWBS_ELEM
                                      the field name is    PRIORITY.
                                     When PRIORITY = ' i ' then    ZWBS_ELEM is at IOS Level
                                     When PRIORITY = ' y ' then  ZWBS_ELEM is at Warranty Level.
    4. ODS name :  /BIC/AZCOST00 and same is table name active data table .
    So please tell me the routine Code .
    Best Regards ,
    Amol.

    Hi Dinaker,
    Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
    Thanks,
    SAPBWI

  • Looking for an ABAP-code for the customer-Exit Variable

    Hello,
    I have defined a Variable (Interval) which should be processed through Customer-Exit on characteristic Supplier-Date (date format). This Customer-Exit Variable is called ZDATE.
    We have another time characteristic Fiscal year / period (0FISCPER) which has single mandatory input variable for ex.  003.2011. This input variable is called ZFISCPER.
    Now I have to write an ABAP-Code where the customer exit variable ZDATE is derived (fiscal last year to last period) from input variable ZFISCPER in INCLUDE ZXRSRU01.
    Means when the input variable (ZFISCPER) is 003.2011 then the customer exit variable ZDATE should be calculated in INCLUDE ZXRSRU01 as 01.01.2010 u2013 28.02.2011 (fiscal last year to last period).
    Since I am quite new in ABAP, I will be grateful if you could write me sample ABAP for this.
    Many thanks.

    Hi,
    should be something like:
    DATA: l_s_range TYPE rsr_s_rangesid,
    input LIKE sy-datum.
    When 'ZDATE'
    CONCATENATE '0101' 0FISCPER+3(4)-1 into l_s_range-low. "You get 01012010
    CONCATENATE '01' Fiscper+1(6) into input.                            "You get 01032011
    l_s_range-high = input-1.                                                     "You get 28022011
    APPEND l_s_range TO e_t_range.
    Greetings
    Roman

  • What is the T CODE for the below menu ......

    Hi SAP Gurus,
    Need your quick responce.....
    when i go to SPRO>Cross-Application Components>General Application Functions>Cross-Application Document Numbering>Argentina-->Assign Document Class to Document Type.
    I want to know the T CODE of "Assign Document Class to Document Type" as it is showing SPRO to me hence i went to menu Additional Information>Display Key> IMG Activity.....
    Now i see "OFFDOCNO_AR_003" displayed against Assign Document Class to Document Type.
    I guess this is not the T CODE i try all possible option like "AR_003", "OFFDOCNO_AR_003"  etc as a T CODE for Assign Document Class to Document Type but is not showing....
    Please advice me what could be the T CODE of the above menu path........
    Regards.

    Hi,
    Not all activities are assigned a TCode.  However, you can create a TCode if you want.
    Go to TCode SE93.
    Give a TCode (as you require, but it should start with Z) like ZTBL and click on create.
    In the resulting screen, give a description and select 'Parameter Transaction'.
    In the next screen, give the following values.
    Transaction - SM30
    Skip initial screen - enabled
    Inherit GUI Attributes - enabled
    Add the following in 'Default Values' table at the end.
    VIEWNAME - V_T003_B_I
    SHOW - X
    Save this transaction select a package other than local (else you cant transport)
    Now you can access the table maintenance thru the TCode you created (ZTBL in this example).
    Hope this helps.
    Ravi.

  • Need ABAP help for the logic in C_T_DATA

    Hi
    I have a scenario where I need to write ABAP in CMOD for the c_t_data which  appears as below:
    St Dt(sobid)    Enddt(sobid)    Sobid    ObjectID   St Dt(ObjectID)     Enddt(ObjectID)
    21.08.09            27.08.09         34567    40001        23..09.09                 29.09.09
    21.08.09            27.08.09         34567    40002        24..09.09                 29.09.09
    21.08.09            27.08.09         34567    40003        25..09.09                 29.09.09
    21.08.09            27.08.09         34567    40004        26..09.09                 29.09.09
    21.08.09            27.08.09         34567    40005        27..09.09                 29.09.09
    I need to compare all the Start dates of the object ID for every  Sobid with the start date of  Sobid field  and need to set the flag if any of the start dates of  object id is different from the Sobid Start date.
    Please advise what would be the best way to write the ABAP.
    Thanks in advance.

    Hi,
    first you can store these 2 dates into some internal table sat it_sobid  and it_ObjectID.Now
    sort  it_sobid ascending.
    loop at  it_ObjectID.
    Read date from  it_sobid  binary search index sy-index.
    it_ObjectID-date =  it_sobid-date.
    flag = 'y'.
    endloop.
    you can write some logic like this. Its just a rough idea you can modify according to ur need.
    Regards,
    Ravi

  • Need ABAP code for Routine

    Hi Gurus My requirement goes like this.
                                  I need to write the routine in Transformation from DSO to DSO
    Source table
    Doc         Amt         Netduedate      Reference Doc
    1000      10000     01.01.2010        
    1500       5000      30.01.2010        1000
    1700       3000      02.02.2010        1000  
    In the Above table 1st document is Invoice Document, 2nd and 3rd are Partial Payment Document.
    My requirement is 2nd and 3rd record Netduedate value should have 01.01.2010 by referring reference Doc field, for the above Ex We should have the output like this
    Target table
    Doc         Amt         Netduedate      Reference Doc
    1000      10000     01.01.2010        
    1500       5000      01.01.2010        1000
    1700       3000      01.01.2010        1000  
    Please give me the syntax code and where to write the code ie in the start routine or in the field routine. the dataflow is between one DSO to Another DSO
    Please Provide me the solution ASAP as this is very Urgency.
    Thanks in Advance

    If suppose your documents are being loaded in same load,
    1. start routine - create internal table like SOURCE_PACKAGE
    DATA IT_SOURCE_PACKAGE TYPE TABLE OF SOURCE_PACKAGE.
    DATA WA_SOURCE_PACKAGE LIKE LINE OF SOURCE_PACKAGE.
    2. copy all records to new internal table, IT_SOURCE_PACKAGE[] = SOURCE_PACKAGE[]
    3. delete partial docs, DELETE IT_SOURCE_PACKAGE WHERE REF_DOC IS NOT INITIAL.
    4. Sort internal table SORT IT_SOURCE_PACKAGE BY DOC
    5. Look for original doc inside loop.
    LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS> WHERE REF_DOC IS NOT INITIAL.
    READ TABLE IT_SOURCE_PACKAGE 
          INTO WA_SOURCE_PACKAGE
          WITH KEY DOC = <SOURCE_FIELDS>-REF_DOC  BINARY SEARCH.
    IF SYSUBRC EQ 0.
      <SOURCE_FIELDS>-NDUEDATE = WA_SOURCE_PACKAGE -NDUEDATE.
    ENDIF.
    ENDLOOP.
    If the original documents are found in different loads in the source DSO, we need to pull the records from active table of the target DSO after step 2.
    -Jijo

  • Need ABAP code for Datasource Enhancement

    Hi All,
    I need no Enhance the WBS Element(PS_PSP_PNR) to2 LIS_02_ITM Datasource
    the table EKKN Having WBS element
    From EKKN Table We have to take the filed Append to the2LIS_02_ITM datasource
    Please any one give me ABAP code which is write in CMOD
    Thanks........
    Regards!
    Malli

    Hi,
    See SAP Help
    http://help.sap.com/saphelp_nw04s/helpdata/en/6e/fe6e420f00d242e10000000a1550b0/content.htm
    See the simple example code, so follow the same.Take ABAPer help, don't use select and end select.
    CASE i_datasource.
      Data: l_s_data1 LIKE mc13vd0itm,
            l_tabix   LIKE sy-tabix,
      WHEN '2LIS_13_VDITM'.
        LOOP AT c_t_data INTO l_s_data1.
          l_tabix = sy-tabix.
          SELECT SINGLE auart INTO l_s_data1-zzprdtyp FROM vbak
                 WHERE  vbeln  = l_s_data1-aubel.
          IF sy-subrc = 0.
            MODIFY c_t_data FROM l_s_data1 INDEX l_tabix.
          ENDIF.
        ENDLOOP.
    ENDCASE.
    Data: l_s_data18 LIKE mc12vc0itm ,
          l_tabix   LIKE sy-tabix.
      WHEN '2LIS_12_VCITM' .
        LOOP AT c_t_data INTO l_s_data18.
          l_tabix = sy-tabix.
          SELECT SINGLE ernam FROM ekko
           INTO (l_s_data18-ernam)
           WHERE ebeln = l_s_data18-vgbel .
          IF sy-subrc = 0.
            MODIFY c_t_data FROM l_s_data18 INDEX l_tabix.
          ENDIF.
        ENDLOOP.
    See article on Step by Step Guide to Enhance a Data Source:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00c1f726-1dc2-2c10-f891-ddfbffdb1a46?quicklink=index&overridelayout=true
    Thanks
    Reddy

  • Variable Exit Code for the below requirement, Pls Urgent

    I have a WorkDate and Finish Date coming in the cube. I have created 2 fields InfoObject High and InfoObject Low.
    1. The InfoObject High should output "Gigh" if the current date (or date entered into the selection criteria) is after the workdate and the finish date is blank. 
    2. The InfoObject Low should output "Low" if the Finish Date has a value and it's greater than the WorkDate.

    Hi Raj,
    In ver 3.5 this can be done using virtual logic in transaction CMOD.  Please note you will need to key your infoobject names below.
    You will need to implement the following code within ZXRSRZZZ.
    FORM USER_<i>cubetobesepecified</i>
    FORM USER_<i>cubetobespecified</i> USING I_S_RKB1D TYPE RSR_S_RKB1D
                        CHANGING C_S_DATA TYPE ANY.
      ASSIGN COMPONENT G_POS_<i>cube_dateobjectusedforuserinput</i>
        OF STRUCTURE C_S_DATA TO <l_datekeyed>.
      ASSIGN COMPONENT G_POS_<i>cube_intoobjecthigh</i>
        OF STRUCTURE C_S_DATA TO <l_highlow>.
      ASSIGN COMPONENT G_POS_<i>cube_workdateojbect</i>
      OF STRUCTURE C_S_DATA TO <l_workdat>.
      ASSIGN COMPONENT G_POS_<i>cube_finishdateobject</i>
      OF STRUCTURE C_S_DATA TO <l_finishdat>.
      IF <l_finishdate> IS INITIAL
        AND <l_datekeyed> > <l_workdat>.
        <l_highlow> = 'High'.
      ELSEIF NOT <l_finishdate> IS INITIAL
        AND <l_datekeyed> < <l_workdat>.
        <l_highlow> = 'Low'.
      ENDIF.
    ENDFORM.
    After this is complete you will need to implement the following code in ZXRSRU02.
        l_s_chanm-chanm = '<i>dateobjectusedforuserinput<i>'.
        l_s_chanm-mode = rrke_c_mode-read.
        append l_s_chanm to e_t_chanm.
      l_s_chanm-chanm = '<i> intoobjecthigh</i> '.
      l_s_chanm-mode = rrke_c_mode-no_selection.
      append l_s_chanm to e_t_chanm.
        l_s_chanm-chanm = '<i>workdateobject<i>'.
        l_s_chanm-mode = rrke_c_mode-read.
        append l_s_chanm to e_t_chanm.
        l_s_chanm-chanm = '<i>finishdateobject<i>'.
        l_s_chanm-mode = rrke_c_mode-read.
        append l_s_chanm to e_t_chanm.
    Lastly under your Global data declarations, you will need to implement this code.
    G_POS_<i>cube_dateobjectusedforuserinput</i>,
    G_POS_<i>cube_intoobjecthigh</i>,
    G_POS_<i>cube_workdateojbect</i>,
    G_POS_<i>cube_finishdateobject</i>.
    I hope this helps.
    Kind Regards,
    Larry

  • ABAP Code for the SQL Query

    Hi,
    I am a BASIS person.
    I need to create an ABAP program which willl return the <b>count</b> of rows returned by the following query.Pls help me in this
    <b>SELECT AGR_NAME FROM AGR_1250 where OBJECT IN (select OBJCT from
    TOBJ where OCLSS IN ('RS','RSR','RSBC')) AND
    AGR_NAME LIKE 'Z%'</b>
    Message was edited by:
            Balaji R

    hi, Balaji,
    TABLES: ekpo, ekko.
    DATA: BEGIN OF itab1 OCCURS 0,
    ebeln LIKE ekpo-ebeln,
    ebelp LIKE ekpo-ebelp,
    matnr LIKE ekpo-matnr,
    END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
    ebeln LIKE ekko-ebeln,
    lifnr LIKE ekko-lifnr,
    bukrs LIKE ekko-ebeln,
    END OF itab2.
    DATA: count LIKE sy-dbcnt.
    DATA: BEGIN OF itab3 OCCURS 0,
    ebeln LIKE ekpo-ebeln,
    ebelp LIKE ekpo-ebelp,
    matnr LIKE ekpo-matnr,
    lifnr LIKE ekko-lifnr,
    bukrs LIKE ekko-bukrs,
    END OF itab3.
    SELECT-OPTIONS: s_ebeln FOR ekpo-ebeln.
    SELECT ebeln ebelp matnr INTO TABLE itab1 FROM ekpo
    WHERE ebeln IN s_ebeln.
    IF NOT itab1[] IS INITIAL.
      SELECT ebeln lifnr bukrs INTO TABLE itab2 FROM ekko
      FOR ALL ENTRIES IN itab1
      WHERE ebeln = itab1-ebeln.
    count = sy-dbcnt.
    ENDIF.
    LOOP AT itab1.
      READ TABLE itab2 WITH KEY
             ebeln = itab1-ebeln.
      itab3-ebeln = itab1-ebeln.
      itab3-ebelp = itab1-ebelp.
      itab3-matnr = itab1-matnr.
      itab3-lifnr = itab2-lifnr.
      itab3-bukrs = itab2-bukrs.
      APPEND itab3.
    ENDLOOP.
    LOOP AT itab3.
      WRITE : / sy-vline,
                itab3-ebeln, sy-vline,
                itab3-ebelp, sy-vline,
                itab3-matnr, sy-vline,
                itab3-lifnr, sy-vline,
                itab3-bukrs, sy-vline.
    ENDLOOP.
    write : count.
    <b>
    Regards,
    Azhar</b>

  • Please give the complete code for the below problems with action page and Form.

    Create an array, which is holding ‘n’ strings (words), , and implement the functionality to search given string  is present in the array. Give an option to the user to enter the word  to be searched
    Create a static array of ‘n’ numbers , and implement the functionality to search given number is present in the array. Give an option to the user to enter the number to be searched
    Implement the functionality to search given word is present with in the predefined sentence. Give an option to the user to enter the word  to be searched

    As haxtbh has pointed out, these forums are for HELPING you fix code you've already tried and are having issues with.  We aren't here to write your code, whether for a project or homework, from scratch.  We can only help you if you help us by making an attempt.
    V/r,
    ^_^

  • Want a code for the below..

    Hi,
    Please let me know, in ALV's how to display the list output as following.
                  main heading1                                main heading2      
        sub-heading1   sub-heading2           sub-heading1   sub-heading2      
    thanks,
    arun

    use REUSE_ALV_HIERSEQ_LIST_DISPLAY
    regards
    shiba dutta

  • Need ABAP code to make unique hierarchy values - Request prompt help

    hi
    <removed>
    I am new to SAP. Please help me in the following
    I require an ABAP code for the following scenario
    I have a simple hieraarchy. The hierarchy is
    SEG -> fam -> clas -> comm
    The values of the seg , fam, cla, com......all will be charecter values
    But in some cases the values will be NOT_KNOWN
    If the values are NOT_KNOWN i need to change them as NOT_KNOWN_1, NOT_KNOWN_2...like that unique charecter values
    should be replaced for NOT_KNOWN
    Example
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN
    Construction -> equipments -> machinery->NOT_KNOWN
    Computers -> Laptops -> Imported -> NOT_KNOWN
                     -> desktops ->flat monitors -> Indian
                           -> imported                     -> NOT_KNOWN->
    NOT_KNOWN -> baggages
    This should be changed to
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN_1
    Construction -> equipments -> machinery->NOT_KNOWN_2
    Computers -> Laptops -> Imported -> NOT_KNOWN_3
              -> desktops ->flat monitors -> Indian
                              -> imported                         
           -> NOT_KNOWN_4 ->
    NOT_KNOWN_5 -> baggages
    This is to make them unique nodes to upload them in hiereachy
    Data is coming from database tables and i was not supposed to do anything in database and the incomin
    data needs to finetuned like this to update them in cube
    So I like to have some coding which will enable this to work in the start routine
    If start routine is not the right option, where else we can do coding
    <removed>
    Regards
    KC

    data : w_suff_n(8) type n,
             w_suff_c(8).
    loop at data_package.
    if data_package-<fieldval> = 'NOT_KNOWN'.
      w_suff_n = w_suff_n + 1. w_suff_c = w_suff_n.
      shift w_suff_c left deleting leading '0'.
      concatenate data_package-<fieldval> w_suff_c into data_package-<fieldval>.
      modify data_package.
    endif.
    endloop.
    *Change <fieldval> in the above to the actual field name.

  • ABAP Code for BI objects

    Hi Friends,
    I have created BI objects like infocubes, infoobjects, DTP, Datasource to transfer data from a flat file to BI system using SAP GUI... All data from flat file are transfered to BI successfully... i dont have any knowledge in ABAP... So i need to see the ABAP code for the BI objects i created above in my project... how can i see the coding for that?
    thanks in advance
    sasi

    Hi Sasi,
    All the objects which you create in BI will be stored in some standad tables,it only fetch details accordingly from those tables.For MasterData you can find the option as Display Routines in Extras.If you want to get more infomation about the STD Table and the Program involed in BI objects,just enter in (/h) mode.
    Regards,
    Prem

  • ABAP code for BI 7.0 transformations start routine

    Hi all,
    I am trying to update data from DSO1 (Source1: transaction data) to Infocube(TARGET)
    In the transformations Start routine, I have to read DSO2(Source2: Master data) for some fields.
    DSO1 has CUSTOMER as part of key
    DSO2 has CUSTOMER (key) and other fields....FIELD1, FILED2, FIELD3
    Infocube to be updated with FIELDS1,2 & 3 WHILE READING DSO2.
    WHERE DSO1 CUSTOMER matches with DSO2 CUSTOMER.
    Also, data NOT TO BE UPLOADED into Infocube if FIELD1 in DSO2= NULL
    Please give me the abap code for the above logic.
    Appreciate any help in this regard.
    Thanks.

    This is a doc from this site:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    Ravi Thothadri

  • Need to find a BAPI for the below requirement

    Hi All,
    Need to find a BAPI for the below requirement.
    We are assigning roles to users using SU01 T-Code and we are in the process of automating this and since we need a BAPI which can do this. Apart from assigning roles to users, SU01 T-code is doing many functionalities, but if we can get a BAPI which can perform assigning roles to users will suffice the requirement.
    Thanks in advance,
    Srilakshmi.

    Hi SreeLakshmi
    see the list of BAPIs given below.
    1065 Business Object Employee
    BAPI_JOBROLE_CLONE Create a User Role in Another System By Copying
    BAPI_BUPA_ROLES_GET SAP BP, BAPI: Determine All Roles
    BAPI_BUPA_ROLE_ADD SAP BP, BAPI: Add Role
    BAPI_BUPA_ROLE_EXISTENCE_CHECK SAP BP, BAPI: Check Existence of Role
    BAPI_BUPA_SET_ROLE SAP BP: Set Object Part / Roles
    BAPI_GET_EVENTTYPE_FOR_ROLE Determine Business Event Types Using Standard Role
    BAPI_EMPLOYEET_CHANGEPASSWORD Change employee password
    BAPI_EMPLOYEET_CHECKPASSWORD Check employee password
    BAPI_EMPLOYEET_CREATE_PW_REG Create entry for employee password
    BAPI_EMPLOYEET_DELETE_PW_REG Delete entry for employee password
    BAPI_EMPLOYEET_DEQUEUE Unlock employee
    BAPI_EMPLOYEET_ENQUEUE Lock employee
    BAPI_EMPLOYEET_GET_PW_REG Read entry for employee password
    BAPI_EMPLOYEET_INITPASSWORD Initialize employee password
    Reward if helpful
    Regards
    Lakshman

Maybe you are looking for

  • Playback freezes in timeline

    I've seen other posts about this. I am using FCE HD and a Maxtor 250 GB Firewire drive. I'm working on a concert video, combining clips from 4 cameras (4 angles). I captured the clips via FCE and can edit them, but certain clips freeze when playing b

  • Facility creation

    Dear ALL,     Pls find the requirement & confirm is it possible in SAP TR? 1. I have bank gurantee in company & i would like to bring all in SAP. 2. Bank guarantee will have lcertain limit for the amount. 3. i am considering the business partner as b

  • Macbook Pro's iSight stopped working.

    Hey there, I just got a new MacBook Pro about a week ago. The iSight built in web-cam has been working fine for the past few weeks. I haven't used it in about a week now, and when I tried loading it up in iChat, Photo Booth, and Skype (all on the App

  • Partition an Existing Table with Data

    We have a table that is approx. 23Gb with 90 million rows. We need to partition it. What is the fastest or most efficient way to accomplish this? Oracle 10.2.0.4.

  • Jdbc version

    is there a way i can programatically determine whether the driver i am using is jdbc 2.0 compliant?