PROVIDE statement not working as I expected

I am creating a report via the HR Logical Database PNPCE. It's pretty straightforward, and I'm returning data for two Infotypes -- 0001 and 0008 (Subtype '0' for Basic Contract).
The clients said they'd like records combined unless there's a data value change between the time period (a two-week period) for Org. Unit (orgeh), Cost Center (kostl), or Time Recording Admin. (sachz). Looking back at my spiffy HR Programming course notes, it looks like I need to do a "join" and a "contraction", so my code looks like this:
PROVIDE orgeh kostl sachz FROM p0001
FROM p0008
BETWEEN pn-begda AND pn-endda
WHERE p0008-subty = '0'.
So far so good. Testing data is nearly non-existent, but I think this is the right approach. Here's the problem: all those other data values I need from p0001 other than orgeh, kostl, and sachz are blank. I can understand why -- instead of *, I've specified three specific fields to return.
So how do I get those other fields I need from p0001? Do I...
1) ...code a separate PROVIDE * FROM p0001 prior to this, and save my values then?
2) ...add them as part of my original PROVIDE statement, so after PROVIDE orgeh kostl sachz, I add other fields as well?
3) ...read the 0001 Infotype directly, through a function, to get the data?
I feel like I'm real close on this one -- I just need to get past this hurdle. It's going to be a huge learning experience for me as well, as I've never done a report using this approach before.
Thank you!

Suresh,
That part I understand.  And I think what you're saying is one of the options I was pondering -- using a PROVIDE statement on just the P0001 table prior to the contracting.
For now, I'm going to change it back to PROVIDE * so I can get all of the information and continue working on my project.  But if anyone has further advice, please post, as I think this is a key area of HR programming that I need to make sure I understand.
Thanks again,

Similar Messages

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • The product I bought its not working as i expected, it doesn´t translate the exact information from pdf to excel, how can you help me or how can you return my money back....

    how can you help me

    What about adobé export PDF. ?
    Enviado desde mi iPhone
    El 07/05/2014, a las 23:00, Claudio González <[email protected]> escribió:
    The product I bought its not working as i expected, it doesn´t translate the exact information from pdf to excel, how can you help me or how can you return my money back....
    created by Claudio González in Adobe Reader - View the full discussion
    If you bought Reader, you were swindled, because it's a free program. And it has never been able of converting PDF files to any other format.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6363992#6363992
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Reader by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • If condition statement not working in jsp scriptlet

    <%
    String hostName = java.net.InetAddress.getLocalHost().getCanonicalHostName();
    if(hostName.endsWith("dinesh.com"))
    System.out.println("it works");
    else {
    System.out.println("it doesn't work");
    %>
    I am getting output as it works & it doesn't work. It seems the If condition is not working. Pls help with this issue.
    Thanks

    Dinesh_Nala wrote:
    Even the condition in if is returning true, the x value i am get as "/user2/"How did you knew that it returns true? Or did you just expect that? Do you trust yourself more than Java? Too bad.
    Just debug it:
    System.out.println("Actual hostname value: [" + hostName + "]");
    System.out.println("Does it end with dinesh.com? " + hostName.endsWith("dinesh.com"));

  • Case when statement not working

    hi there, I am trying to work out how to get my case statement to work.
    I have got the following code. 
    select pthproto.pthdbo.cnarole.tpkcnarole, pthproto.pthdbo.cnaidta.formataddr as formataddr, cnaidta.dateeffect as maxdate, isnull(cast (pthproto.pthdbo.cnaaddr.prefix1key as varchar (50)),'') + ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix2key
    as varchar (50)),'')+ ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix3key as varchar (50)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.houseidkey as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component1
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component2 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component3 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component4
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component5 as varchar (100)),'') as mailaddress, row_number() over(partition by pthproto.pthdbo.cnarole.tpkcnarole order by cnaidta.dateeffect desc) as rn into #address from pthproto.pthdbo.cnarole
    inner join pthproto.pthdbo.cnaidty on cnarole.tfkcnaidty =cnaidty.tpkcnaidty inner join pthproto.pthdbo.cnaidta on cnaidty.tpkcnaidty = cnaidta.tfkcnaidty inner join pthproto.pthdbo.cnaaddr on cnaidta.tfkcnaaddr = cnaaddr.tpkcnaaddr order by cnaidta.dateeffect
    select *, case when mailaddress is not null then mailaddress else formataddr end as test from #address where tpkcnarole = '18306695'
    The case when statement is struggling with how i have created the column mailaddress.  As it does seem to understand when it is null.  In the example I have got there is no value in any of the columns to create
    the mailaddress.  Hence why I am referencing it from elsewhere.  Due to having a way on the system where it picks up data from 2 different places.    The mailaddress is always correct if there is one, hence why
    trying to reference that one first.  So how do i change this case when statement to work ?            

    It's ok I have fixed my own problem
    when
    (mailaddress
    is
    null 
    or mailaddress

    then formataddr
    else mailaddress
    end
    as test
    case

  • Active state not working in scrolling site (with anchor links)

    I'm design a scrolling site with anchor links and an horizontal menu on the top.
    when i publish the site and click on the menu buttons the site scrolling to the place of the anchor but the active state in the menu is not working.
    now... when i leave the main page (were the scrolling site is) and then return back to it all active states are working perfectly
    anyone have this bug? or any one know how to fix it ?

    Hmmm...I've just been playing around, and I think I got the Active State to work correctly.  I think my problem was not understand what Active State means.
    To answer your question, I was changing the Font Color and Box Fill Color of the Active State.
    I did not understand that Active State means the look of the Menu Item when the PAGE is active.  I thought it meant the look of the Menu item when the cursor is scrolling down the Menu (i.e. when the MENU is Active, not the page).
    Look at this page for an example of what I'm trying to achieve...
    http://www.pgavdestinations.com
    When you hover over the "Work" menu item, and move the cursor down the menu, the state of "Work" remains changed until you move the cursor off of that menu column. It does NOT return back to it's Normal state until you are off of that menu column.
    Is there a way to achieve this with the menu states in Muse?
    Thanks for the replies!
    Dave.

  • Import/Export statement  not working..

    Hi all,
       I want to export some data from BADI & Import it back in user exit.
    I wrote following line of code in BADI
           export P1 FROM xstr to memory id 'ZABHI'.
    & following line of code in User Exit
          import P1 to xstr FROM memory id 'ZABHI'.
    After export sy-subrc becomes 0 hence export statement is working fine but when aftr import xstr remains blank.(sy-subrc = 4)
    I tried to execute same code in single ztest abap program & it works fine there.
    Thanks in advance.

    hi abhijeet,
    you are most welcome....
    to delete, use
    ** deletes the data to save wastage of memory
    delete from database indx(xy)
      client sy-mandt
      id 'ZABHI'.
    you need to delete it coz, its available to all programs in the R/3
    server via the ID and you don't want anybody to view the data u are
    sending into memory.
    the statement that u used earlier was program specific and hence
    not accessible to the user exit.
    Regards,
    Samson Rodrigues.

  • Hide statement not working

    Hi experts,
    i am using hide statement but it is not working..The problem with it is that after line selection the variable on which i have used hide is carrying the last value of internal table always..<< Removed >>
    Regards,
    Raman
    Edited by: Rob Burbank on Jun 30, 2009 10:41 AM

    I am sending a test program with same problem...iin this after line selection the field variable emp-name is displayin only last entry of internal table...
    *& Report  ZBASICX12
    REPORT  ZBASICX12.
    INITIALIZATION.
      DATA: BEGIN OF ITAB OCCURS 0,
            EMPID  TYPE ZTEMP-EMPID,
            EMPNAME TYPE ZTEMP-EMPNAME,
            END OF ITAB.
    START-OF-SELECTION.
      SELECT EMPID EMPNAME FROM ZTEMP INTO TABLE ITAB.
      SORT ITAB BY EMPID.
      LOOP AT ITAB.
        WRITE: / ITAB-EMPID HOTSPOT.
        HIDE ITAB-EMPID.
      ENDLOOP.
    END-OF-SELECTION.
    AT LINE-SELECTION.
      CASE SY-LSIND.
        WHEN 1.
          WRITE: ITAB-EMPNAME.
      ENDCASE.

  • UPDATE statement not working

    Hi,
    I want to modify the record of PA0009 .I want to change the enddate of personnel No.
    UPDATE PA0009 SET ENDDA = '30.10.2009'
                  WHERE PERNR = '1'
                  AND BEGDA =  '01.09.2008'.
    The above statement is not working. How to modify the enddate which is part of key table.
    Please guide.
    Thanks and Regards
    K Srinivas

    Hello,
    Set the data format to the internal date format (YYYYMMDD), so in the set and the where clause pass '20091030' as ENDA which is to be changed and BEGDA in the where clause as 20080901. Also if the after the changes if the key combination results in dupicate records then the update will faiil. Just make sure that the combination of PERNR,SUBTY,OBJPS,SPRPS,ENDDA, BEGDA and SEQNR remains unique, if a record exists with this combination then sy-subrc will be 4 and the record will not be updated.
    Regards,
    Sachin

  • Collect statement not working

    Hi,
               My collect statement is not working. Kindly let me know what is the other way to add one filed in the loop.
    thanks
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Nov 19, 2009 9:24 AM

    Same thing i faced few days ago --. i have resolved this using following logic ... try this it will workout
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
    CLEAR: wa_p_coi.
    READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
    IF sy-subrc = 0.
    wa_p_coi-Avg Days = wa_p_coi-Avg Days + wa_mkpf_mseg-Avg Days.
    MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days .
    CLEAR: wa_p_coi, wa_p_coi.
    endif.
    ELSE.
    wa_p_coi-werks = wa_mkpf_mseg-werks.
    wa_p_coi-matnr = wa_mkpf_mseg-matnr.
    wa_p_coi-bwart = wa_mkpf_mseg-bwart.
    wa_p_coi-lgort = wa_mkpf_mseg-lgort.
    wa_p_coi-Avg Days = wa_mkpf_mseg-Avg Days .
    APPEND wa_p_coi TO t_p_coi.
    CLEAR: wa_p_coi.
    ENDIF.
    w_werks = wa_mkpf_mseg-werks.
    w_matnr = wa_mkpf_mseg-matnr.
    w_lgort = wa_mkpf_mseg-lgort.
    w_bwart = wa_mkpf_mseg-bwart.
    CLEAR: wa_mkpf_mseg.
    ENDLOOP.

  • MDX simple case statement not working?

    hi all - any idea what is wrong with this MDX statement? it is returning blank. I am trying to add a calculated measure using the below code but it is not working. thanks for the help.
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER = "Cash" THEN
    ([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END

    If you are checking for the 'Cash' member of the Account Name hierarchy, do you need to do something like this?
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER IS [Accounts].[Account Name].[Cash] THEN([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END
    Regards,
    MrHH

  • SQL Statement not works using functions or subqueries-MAXDB

    Hello All,
    I created an ABAP program to select information about country(table: T005) with the country names (Table: T005T). I tried to create a sql query with a sql subquery to select everything but for some reason that I don't know it doesn't work. Please find the query below.
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, `
               &&       `(SELECT landx `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ), `
               &&       `(SELECT natio `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ) `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Well, the query above works but the fields LANDX and NATIO are in blank in ALL THE CASES, even with information registred in table T005T.
    So, exploring the SDN forum and after read some documents regarding ADBC, I create a function to handle this sql select and get the correctly the missing informations, but, still don't work. Please find the function below:
    CREATE FUNCTION select_landx (land1 CHAR(3)) RETURNS CHAR(15)
    AS
      VAR landx CHAR(15);
      DECLARE functionresult CURSOR FOR
      SELECT spras, land1, landx
         FROM SAPNSP.t005t
         WHERE spras = 'EN'
             AND land1 = :land1;
         IF $count IS NULL THEN <- | $count is always 0, my SELECT
           BEGIN                                 it's not work but I don't know why
             CLOSE functionresult;
             RETURN NULL;
           END
         ELSE
           SET $rc = 0;
           WHILE $rc = 0 DO
           BEGIN
             FETCH functionresult INTO :landx;
           END;
         CLOSE functionresult;
         RETURN landx;
    Calling the function in a SQL statement:
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, select_landx(?) landx `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Any comments ?
    Best regards,
    Arthur Silva

    Hello,
    Thank's a lot, it works. It's funny because the given solution works using only abap codes.
    It may be happens because the abap interpretor send the sql statement to the db interface that handle the code in the another way.
    Thanks again, it was driving me crazy.
    Best regards,
    Arthur Silva

  • Merge statement not working over db link

    I have a merge statement that works fine when it's run against a local table, but when I try to run it against a table over a database link, I get the following error.
    ERROR at line 1:
    ORA-01008: not all variables bound
    ORA-02063: preceding line from REPOS
    ORA-06512: at "DBADMIN.PING_DB", line 6
    ORA-06512: at line 1
    Here is the code:
    create or replace procedure ping_db
    as
    begin
    merge into availability@repos A
    using (select trunc(sysdate) from dual)
    on (trunc(A.day) = trunc(sysdate))
    when matched then update set A.uptime = A.uptime + 1
    when not matched then insert (hostname,dbname,day,uptime) values
    (utl_inaddr.get_host_name,sys.database_name,trunc(sysdate),1);
    commit;
    end;
    /Code compiles fine, but gets the error when it's executed. Any help would be appreciated.

    9.2.0.x is the version (9.2.0.4,.5 and .6)

  • Balance Sheet Statements not working

    Hello,
    I have deployed the standard scenario for the Balance Sheet statement, but unfortunately when I execute the query, the balance dependencies in the FS hierarchy are not working. They don't appear in the hierarchy nodes. I have a difference in my balance sheet due to these missing financial statements.
    I have activated 0figl_vc1, 0figl_c01 and the flow before the cubes.
    Any idea about what is happening?
    Best regards
    Sérgio

    Hello Sérgio,
    In that program are you using in the "Financial statement version" parameter the same one that you're using in BW?
    Be sure of that.
    Also compare with others "Financial statement version" (but always comparing the same between systems) to see if the result is ok.
    You should be comparing the totals and not the subtree. If the totals are ok, the hierarchy is constructed different between systems. Compare the hierarchy.
    Also for the most detailed difference you'll find compare with the data in cube 0FIGL_C01 and not the 0FIGL_VC1 to see if there the data is ok.
    Diogo.

  • Lucene import statements not working

    I'm new to Tomcat, Lucene, and JSP, so bare with me...
    I just installed all three and Tomcat and JSP are working and Lucene is working. Now I'm trying to get them working together but I don't know where my issue is. I have a sample page I found and it's not working and giving me the following error messages...
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 6 in the generated java file
    Only a type can be imported. com.knowledgebooks.servlet.StartupWorkServlet resolves to a package
    An error occurred at line: 7 in the generated java file
    Only a type can be imported. org.apache.lucene.document.Document resolves to a package
    An error occurred at line: 8 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Searcher resolves to a package
    An error occurred at line: 9 in the generated java file
    Only a type can be imported. org.apache.lucene.search.IndexSearcher resolves to a package
    An error occurred at line: 10 in the generated java file
    Only a type can be imported. org.apache.lucene.analysis.Analyzer resolves to a package
    An error occurred at line: 11 in the generated java file
    Only a type can be imported. org.apache.lucene.analysis.standard.StandardAnalyzer resolves to a package
    An error occurred at line: 14 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Query resolves to a package
    An error occurred at line: 15 in the generated java file
    Only a type can be imported. org.apache.lucene.queryParser.QueryParser resolves to a package
    An error occurred at line: 16 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Hits resolves to a package
    An error occurred at line: 17 in the generated java file
    Only a type can be imported. com.knowledgebooks.API resolves to a packageI'm not even sure where to begin looking. Does anyone have any idea?
    Thanks in advance!

    can you provide me your jsp code? so i can look into and advice you.

Maybe you are looking for

  • Problem using the new Lightening Plug in my car's USB port?

    I have an 2011 Lexus RX 350 and just got a new IPAD mini.  I tried using the Mini on a recent trip by plugging it into my car's USB port and got a message on the car's entertainment display that it could not recognize the USB device.  Anyone else hav

  • Time out error while fetching records from table BKPF

    Hi, I am fetching records from table BKPF using BUKRS & AWKEY in where clause. Query is as follows:     SELECT BELNR  XBLNR  AWKEY     FROM   BKPF     INTO TABLE L_I_BKPF_TEMP     PACKAGE SIZE 500     WHERE BUKRS LIKE L_C_EG     AND   AWKEY IN L_R_AW

  • Aggregates  (Levels)

    Hi, Somebody know if exist a Table where I can get the level of an aggregate? I have many Cubes with many aggregates (e.g. Aggregate 100100 Parent / 100101 Child / 100102 Grandson, etc..) I need to separate all aggregates Parents, and childs. **I kno

  • Repost my question

    I want to use "telnet" in java program in this way: 1.run telnet(such as using runtime class) 2.wait for the '>' 3.input : open www.website..... So I thought out a way to use I/O redirection I redirect the output stream of telnet into the JTextArea t

  • How to tune the query for duplicate records while joining the two tables

    hi,i am executing the query which has retrieving multiple tables,in which one of them has duplicate record,how to get single record