Using Provide statement in HR programming

Hi,
Im using the code below;
PROVIDE FROM p2001 BETWEEN pn-begda AND pn-endda
   WHERE p2001-subty = '0101'.
ENDPROVIDE.
But the subty = 0101 doesnt seem to be working. When i look at the p2001 table after i execute the code, it does limit within the date range but not the subtype.
Thanks

hi,
DATA  i_2001 TYPE p2001 OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF i_output,
       v_AWART  TYPE p2001-AWART,
   END OF i_output.
DATA : it_out TYPE STANDARD TABLE OF i_output INITIAL SIZE 0,
       wa_output TYPE i_output.
START-OF-SELECTION.
GET pernr.
  rp_provide_from_last p2001 space pn-begda pn-endda.
  CHECK p2001-SUBTY = '0101'.
  LOOP AT p2001 WHERE  begda  GE pn-begda
                                    AND begda LE pn-endda.
    MOVE-CORRESPONDING p2001 TO i_2001.
    APPEND i_2001.
    DELETE p2001.
  ENDLOOP.
  wa_output-v_AWART   = i_0000-AWART.
  IF  p2001-begda  GE pn-begda AND p2001-begda LE pn-endda.
          APPEND wa_output TO it_out.
      ENDIF.
REFRESH i_20001[].
  CLEAR i_2001.
REGARDS,
sreelakshmi
Edited by: Sreelakshmi p on Jun 23, 2008 3:02 PM

Similar Messages

  • Error using SHIFT statement when migrating program from R/3 4.7 to ECC6.0

    Hello Experts,
    The SHIFT statement is giving following error in ECC6.0 but the same is warning in R/3 4.7.
    "Floating point variable can not be used with SHIFT statement.".
    Statement is - SHIFT itab-f1 by 5 places where f1 is a floting point field.
    We passed the value in string variable and used in the SHIFT statement. It is removing the error but not giving the result same as in R/3 4.7.
    Please let me know how to solve this.
    Thanks and Regards,
    Rahul

    Hello,
    Thanks for the reply.
    We don't know why was this code written. We are just moving the object from R/3 4.7 to ECC 6.0 and fixing the errors.
    Could you please let me know "What it means to SHIFT a floating point variable by some spaces"? .
    This i am asking because SHIFT RIGHT generally means to shif the value to the right by some spaces i.e. inserting space at the starting.
    But in case of floating point it change the value itself. If you can tell me then i can find an alternative solution to get the same result.
    Thanks and Regards,
    Rahul

  • TABLES statement in report program

    Hi,
    Is there any performance issue in using TABLES statement in report program? Because I have got an review point from QA insisting me to avoid TABLES statement. Is it recommended by SAP to avoid TABLES statement in report program?
    Thanks in advance.
    Regards,
    Balaji Viswanath.

    Balaji,
    If you use TABLE statement it will provide the work area of the given table.
    EX: Decalre  any fields of table in slection scereen
    without declarin g the tabel name in TAble statement.It will give error.
    This will give error.
    SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
    This will work.
    TABLES: mara.
    SELECT-OPTIONS : s_matnr LIKE MARA-matnr.
    It means it will occupy some area.
    Don't forget to reward if useful.

  • Create spool for background jobs which uses submit statement

    Hi Gurus,
                 I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
    Thanks in advance, <REMOVED BY MODERATOR>
    Regards,
    Srinivas.
    Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PM

    hi check this link ...
    Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
    DATA: number TYPE tbtcjob-jobcount,
          name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
    sy-subrc  Meaning
    0            Background task scheduled successfully.
    4            Scheduling cancelled by user on the selection screen.
    8            Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
    12          Error in internal number assignment.
    regards,
    venkat.
    Edited by: venkat  appikonda on Mar 18, 2008 6:32 PM

  • How to use  provide and endprovide

    Hi all,
    I am using provide statement in this way.
    provide * from p0001
    from p0002
    from p0000 where p0000-stat2 = '3'
               between pn-begda and pn-endda.
    write statement.
    endprovide.
    here i am getting error saying that between is missing.
    so my question is how to use multiple  where conditions.
    thanking u.
    with regards,
    giri.

    <b>Example 1</b>
    DATA: BEGIN OF wa1,
            col1 TYPE i,
            col2 TYPE i,
            col3 TYPE string,
          END OF wa1.
    DATA: BEGIN OF wa2,
            col1 TYPE i,
            col2 TYPE i,
            col3 TYPE string,
          END OF wa2.
    DATA: itab1 LIKE STANDARD TABLE OF wa1,
          itab2 LIKE STANDARD TABLE OF wa2.
    DATA: flag1(1) TYPE c,
          flag2(1) TYPE c.
    wa1-col1 = 1.
    wa1-col2 = 6.
    wa1-col3 = 'Itab1 Int1'.
    APPEND wa1 TO itab1.
    wa1-col1 = 9.
    wa1-col2 = 12.
    wa1-col3 = 'Itab1 Int2'.
    APPEND wa1 TO itab1.
    wa2-col1 = 4.
    wa2-col2 = 11.
    wa2-col3 = 'Itab2 Int1'.
    APPEND wa2 TO itab2.
    PROVIDE FIELDS col3
              FROM itab1
              INTO wa1
              VALID flag1
              BOUNDS col1 AND col2
            FIELDS col3
               FROM itab2
               INTO wa2
               VALID flag2
               BOUNDS col1 AND col2
            BETWEEN 2 AND 14.
      WRITE: / wa1-col1, wa1-col2, wa1-col3, flag1.
      WRITE: / wa2-col1, wa2-col2, wa2-col3, flag2.
      SKIP.
    ENDPROVIDE.
    <b>Example 2</b>
    DATA: BEGIN OF itab1 OCCURS 0,
            col1 TYPE i,
            col2 TYPE i,
            col3 TYPE string,
          END OF itab1 VALID BETWEEN col1 AND col2.
    DATA: BEGIN OF itab2 OCCURS 0,
            col1 TYPE i,
            col2 TYPE i,
            col3 TYPE string,
          END OF itab2 VALID BETWEEN col1 AND col2.
    itab1-col1 = 1.
    itab1-col2 = 6.
    itab1-col3 = 'Itab1 Int1'.
    APPEND itab1 TO itab1.
    itab1-col1 = 9.
    itab1-col2 = 12.
    itab1-col3 = 'Itab1 Int2'.
    APPEND itab1 TO itab1.
    itab2-col1 = 4.
    itab2-col2 = 11.
    itab2-col3 = 'Itab2 Int1'.
    APPEND itab2 TO itab2.
    PROVIDE col3 FROM itab1
            col3 FROM itab2
                 BETWEEN 2 AND 14.
      WRITE: / itab1-col1, itab1-col2, itab1-col3, itab1_valid.
      WRITE: / itab2-col1, itab2-col2, itab2-col3, itab2_valid.
      SKIP.
    ENDPROVIDE.
    Regards,
    Pavan

  • Why we can't use provide to retrieve Time Infotypes records?

    Hi experts,
    I read some meterials that in HR report we can not use provide statement in LDB to fetch time infotypes records,
    use Loop instead,can anybody explain why and give a example.
    Thanks.

    Hi
    For time infotype records use RP_READ_ALL_TIME_ITY
    (RP_READ_ALL_TIME_ITY beg end)
       DATA: BEGDA LIKE P2001-BEGDA, ENDDA LIKE P2001-ENDDA.
       INFOTYPES:  0000, 0001, 0002, ...
                         2001 MODE N, 2002 MODE N, ...
         GET PERNR.
       BEGDA = '19900101'. ENDDA = '19900131'.
       RP_READ_ALL_TIME_ITY BEGDA ENDDA.
       IF PNP-SW-AUTH-SKIPPED-RECORD NE '0'.
          WRITE: / 'Authorization for time data missing'.
          WRITE: / 'for personnel number', PERNR-PERNR. REJECT.
       ENDIF.

  • Bounds in provide statement

    hi all,
    i need to use provide statement i found this provide in the f1 help.
    but i am unable toget it how it is actually works . after executing this code the values become different than prevous ..
    please give detail description , i have been debugging  this code... still i am unable to get .
    PROVIDE FIELDS col3 FROM itab1 INTO wa1
                                   VALID flag1
                                   BOUNDS col1 AND col2
            FIELDS col3 FROM itab2 INTO wa2
                                   VALID flag2
                                   BOUNDS col1 AND col2
            BETWEEN 2 AND 14.
      WRITE: / wa1-col1, wa1-col2, wa1-col3, flag1.
      WRITE: / wa2-col1, wa2-col2, wa2-col3, flag2.
      SKIP.
    ENDPROVIDE.
    thanks&regards,
    krishna

    Hi,
    Try with the fallowing example
    The columns for interval limits to be specified in the long form as intlim1 and intlim2 using BOUNDS are attributes of the relevant tables in the short form and must be specified when they are declared.
    This is done using the VALID BETWEEN addition that can be specified after DATA ENDOF if an internal table is declared with the obsolete OCCURS addition to the DATA BEGIN OF statement.If an internal table is declared using the INFOTYPES statement, these are the BEGDA and ENDDA columns. If no columns are specified for the interval limits in the declaration, the short form of the PROVIDE uses the first two columns of the internal table.
    example for the bounds
    DATA: BEGIN OF itab1 OCCURS 0,
    col1 TYPE i,
    col2 TYPE i,
    col3 TYPE string,
    END OF itab1 VALID BETWEEN col1 AND col2.
    DATA: BEGIN OF itab2 OCCURS 0,
    col1 TYPE i,
    col2 TYPE i,
    col3 TYPE string,
    END OF itab2 VALID BETWEEN col1 AND col2.
    itab1-col1 = 1.
    itab1-col2 = 6.
    itab1-col3 = 'Itab1 Int1'.
    APPEND itab1 TO itab1.
    itab1-col1 = 9.
    itab1-col2 = 12.
    itab1-col3 = 'Itab1 Int2'.
    APPEND itab1 TO itab1.
    itab2-col1 = 4.
    itab2-col2 = 11.
    itab2-col3 = 'Itab2 Int1'.
    APPEND itab2 TO itab2.
    PROVIDE col3 FROM itab1
    col3 FROM itab2
    BETWEEN 2 AND 14.
    WRITE: / itab1-col1, itab1-col2, itab1-col3, itab1_valid.
    WRITE: / itab2-col1, itab2-col2, itab2-col3, itab2_valid.
    SKIP.
    ENDPROVIDE.
    Hope it will be useful  to you.
    Regards,
    Shirisha

  • 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,

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • Binding a subtree using custom State- and ObjectFactory

    Hi,
    first of all a very short example to illustrate my idea. I know that it would be complete rubbish to store the kind of data in the example in multiple classes and ldap entries. Currently I'm working with much larger objects that must be written according to special schema definitions. This example is really only for illustration!
    LDAP-Schema:
    objectclass ( 1.3.6.1.4.1... NAME 'myperson'
                  SUP top STRUCTURAL
                  MUST ( cn $ sn ) MAY ( email ) )
    objectclass ( 1.3.6.1.4.1... NAME 'myphoto'
                  SUP top STRUCTURAL
                  MUST ( cn $ jpegPhoto ) )
    Java-Classes:
    class MyPhoto {
        byte[] photo;
    class MyPerson {
        String cn;
        String sn;
        String email;
        MyPhoto photo; // This is the really relevant line :)
    }Now to the question:
    Is it possible to bind multiple java objects with one call to bind and to get a subtree by using custom State- and ObjectFactory-Classes?
    Structure of the LDAP-Database
    dn: cn=John Doe
    {  cn=John Doe
       sn=Doe
       [email protected]   }
    dn: cn=TheLogo, cn=John Doe    // Child of cn=John Doe
    { cn=TheLogo              // The cn is the same for all MyPhoto entries
                              // its only use is for building the dn
      jpegPhoto=[some binary data]   }I tried to solve the problem with a kind of recursion. When my StateFactory is called to bind an Object of Class MyPerson it builds the appropriate AttributeList. Before it returns, it calls bind for the Object of class MyPhoto with the dn: "cn=TheLogo,cn=John Doe".
    Of course this doesn't work because the entry for cn="John Doe" doesn't exist at this time. Now I don't know what to do. A possible solution would be to create everything by hand, but then I wouldn't have to use custom StateFactories at all. But if there is a simple solution to my problem I would like to use my own StateFactory instead of having to implement a persistance manager on my own.
    I hope you understand what I want to do and why it doesn't work out. If you don't please ask and I will try to clarify.

    Hello,
    A provisional solution is to use an external controller. For this approach to work, each class has to provide the list of objects being part of its properties. I have prepared two interfaces for this purpose:
    public interface HasSubordinates {
    Enumeration getSubordinates();
    boolean hasSubordinates();
    public interface Storable extends HasSubordinates {
    String getIdentifier();
    Then, you can use the controller to recursively get the object "tree" and store it in the directory (either using objects that implement the DirContext interface or using StateFactories - the last one is the one I have used)
    The code for the Controller is the following:
    import javax.naming.*;
    import javax.naming.directory.*;
    import javax.naming.spi.*;
    import java.util.*;
    import java.io.IOException;
    public class DatabaseAccessController {
    // Constants
    final static String ldapServerName = "localhost";
    final static String rootdn = "cn=juanluis, o=niaf";
    final static String rootpass = "secret";
    final static String rootContext = "o=niaf";
    private DirContext initialContext;
    private static Properties env = new Properties();
    static {
    env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
    env.put( Context.STATE_FACTORIES, "database.PersonStateFactory:database.AddressStateFactory");
    env.put( Context.PROVIDER_URL, "ldap://"+ ldapServerName+"/"+rootContext);
    env.put( Context.SECURITY_PRINCIPAL, rootdn );
    env.put( Context.SECURITY_CREDENTIALS, rootpass );
    public DatabaseAccessController() {
    try {
    initialContext = new InitialDirContext( env );
    } catch( Exception e ) {
    e.printStackTrace();
    public void store( Storable object ) {   
    try {
    store( object, initialContext );
    } catch( NamingException ne ) {
    ne.printStackTrace();
    private void store( Storable object, DirContext ctx ) throws NamingException{
    DirStateFactory.Result result = DirectoryManager.getStateToBind( object, null, null, env, null );
    Attributes attributes = result.getAttributes();
    DirContext new_ctx = ctx.createSubcontext( dn(object), attributes );
    if( object.hasSubordinates() ) {
    Enumeration subordinates = object.getSubordinates();
    while( subordinates.hasMoreElements() ) {
    try {
    store( (Storable)subordinates.nextElement(), new_ctx );
    } catch( Exception e ) {
    e.printStackTrace();
    private String dn( Storable object ) {
    return "cn="+object.getIdentifier();
    This is an example of how it should work on two objects:
    public class Person implements Storable{
    String name;
    String surname;
    Address address;
    public Person(String n, String sn, Address addr) {
    name = n;
    surname = sn;
    address = addr;
    public boolean hasSubordinates() {
    return true;
    public Enumeration getSubordinates() {
    Hashtable h = new Hashtable();
    h.put("address", address );
    return h.elements();
    public String getIdentifier() {
    return name + " "+ surname;
    public class Address implements Storable {
    String street;
    int number;
    Attributes attrs;
    public Address( String s, int n) {
    street = s;
    number = n;
    public boolean hasSubordinates() {
    return false;
    public Enumeration getSubordinates() {
    return null;
    public String getIdentifier() {
    return street + number;
    And here it is the program that access to the directory:
    public class TestLDAP {
    public TestLDAP() {
    public static void main(String[] args) {
    try {
    System.out.println("Creating controller...");
    DatabaseAccessController controller = new DatabaseAccessController();
    System.out.println("Controller created");
    Person person = new Person("Juan Luis", "Manas", new Address("Street in Madrid", 33 ));
    System.out.println("Storing object in the directory...");
    controller.store(person);
    System.out.println("object stored successfully!");
    } catch( Exception e ) {
    e.printStackTrace();
    }���
    If you find a better way of performing the storage of complex objects in the directory, please, let me know.
    Regards,
    Juan Luis

  • Can we use Loop Statement for Ranges

    Hi Friends,
    I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
    I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
    But my question is .....
    My R_range has values as below
    'I' 'EQ' '001'
    'I' 'EQ' '002'
    'I' 'BT' '003' '007'
    'I' 'EQ' '008'
    I have to move all these values to R_New_range and my count of items should be '8'.
    How can i do that????????
    Expecting ur answers....
    Thanks in advance
    Cheers,
    R.Kripa.

    hey friends,
    Its nice to see the replies.... but i think i had confused u all with the question
    Now i'll explain u all in detail ....
    See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
    I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
    Description of the Dump is
    Error in the module RSQL accessing the database interface
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
    neither                                                                
    caught nor passed along using a RAISING clause, in the procedure        
    "GET_COSP_COSS" "(FORM)"                                               
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.                          
    The reason for the exception is:                                        
    The SQL statement generated from the SAP Open SQL Statement violates a  
    restriction imposed by the database system used in R/3.                                                                               
    Possible errors:                                                        
    o The maximum size of an SQL statement has been exceeded.              
    o The statement contains too many input variables.                     
    o The space needed for the input data exceeds the available memory.    
    o ...                                                                               
    You can usually find details in the system log (SM21) and in the        
    developer trace of the work process (ST11).                             
    If an error occurs the developer trace often informs you about the      
    current restrictions.                                                   
    So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
    Now :
    My Projects are stored in the form of a range R_Range
    I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
    I am clear till this .....
    If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
    But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
    Hope iam clear with my question
    If not do revert back ....
    Thanks in advance for the replies
    Cheers,
    R.Kripa.
    My Doubt is ....

  • How can I use HTTP authorization in my program?

    I'm writing full-featured proxy server in Java and want to require users to provide login and password and then use their login-name internally to provide different permissions, different quotas, etc... for different users. How can I do that with Java? I prefer to use standard HTTP method for this (classic pop-up login/password dialog in client browser). This is typical solution for all password-protected proxies.
    This question sounds so simple... How to popup a standard dialog asking for login/password in client browser and get its values for farther processing. But I googled for the solution and found nothing. In the Internet, there is a lot of information about how I can use password-protected proxy but none about how I can write one myself with Java.
    Thanks. I need at least some clues...

    I'm asking exactly what I'm asking for in the title :) . Maybe I need to give an example with additional explanation?
    I'm writing a proxy. It has different settings for each user so it must recognize user name and password. Of course, user want to use a browser or other program (possibly another proxy - for example Proxomitron or Privoxy to filter banners and ads) to make requests via my proxy. Browser (not my proxy) should pop-up a dialog asking for a login and password if my proxy server will require authorization. Of course not every program will pop-up a dialog: for example in case of Privoxy or Proxomitron user must provide login and password for parent proxy. In this example "parent proxy" is my proxy. Question is: how I can request HTTP authorization (by sending Proxy-Authenticate) and handle the input? Is there any standard API for that in Java?
    There is big difference between standard HTTP authorization and custom pop-up dialog or custom web-interface login page. In first case user can use standard settings in his/her program/browser to provide password automatically (in this case user just need to enter his/her password once). HTTP authorization is the standard. My proxy need to handle Proxy-Authorization request-header field.
    The Proxy-Authorization request-header field allows the client to identify itself (or its user) to my proxy which (should be able to) require authentication. The Proxy-Authorization field value consists of credentials containing the authentication information of the user agent for the proxy and/or realm of the resource being requested.
    So more complete question would be: is there standard API or third-party API in Java for requesting Proxy-Authorization field from a client and process its values (for example: if password and login is correct then user is allowed to use the proxy; if not user will be asked for login and password again).
    If someone knows proxy server (with source code in Java) which can use standard password protection this will be good answer to my question too.
    Unfortunately it seems that I will need to write account-management code for my proxy myself. Oh, this isn't too hard but for C/C++ there is a lot of examples and ready-to-use pieces of code which I can use immediately. This is why I'm asking here this question: before I will write HTTP authorization class in Java from scratch I want to make sure there is no "ready-to-use piece of code". I don't want to "reinvent the wheel".
    For now, I even cannot find a proxy server with Java source code with ability to use standard password protection to prevent access for non-authorized users. So I'm asking here if there is ready-to-use API (class) for doing HTTP authorization or I need to write one myself.
    Message was edited by:
    Dark_Dragon

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • New Provide statement in ECC 6.0

    Hi All,
    I am getting infotype 0001 information by using function module HR_READ_INFOTYPE.Now i need to check the Employee subgroup (PERSK) change from 11 to 12 .For this i need to use PROVIDE statment and if change happens i need to make a returning parameter false.
    How can i use the new provide statement
    l_sub is a flag.
    *provide fields * from p0001 into l_temp VALID l_sub*
    BOUNDS persk AND persk  BETWEEN l_begda AND l_endda.
    i am not getting any records while running this query.Can you please help me out.What l_temp returns if the loop pass success.In bound what  i need to give here i need to check the persk value.
    Thanks
    Chandu

    Hi Chandu,
    When you are using the bounds statement in a provide field statement,
    the two fields on which the bound condition is being applied have to be
    different columns of same type of the table from which you are selecting the values..
    For eg
    PROVIDE fields * from p0001 into itab valid flag1  BOUNDS begda AND endda
            BETWEEN pnpbegda AND pnpendda.
    What you are using is not giving any values is because it is referring to only
    one column of the table p0001.
    Get Back if u still have Doubts
    Ira !!

  • Submit statement in ABAP program

    Hi All,
          I am using two submit statements in my program for two different reports. When i run the program i get the output screens of the two reports at the ouptut. Is there any way i can hide the user seeing the output screens of the two programs and display only the output screen of my program. If you have any clues please post it.
    Thanks & Regards,
    Rahul Rathi

    You can call executable programs from other ABAP programs using the following statement:
    SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
    You can either specify the name of the program you want to call statically by entering the program name in the code of the calling program, or dynamically by specifying the name of a field (in parentheses) containing the name of the program. If the system cannot find the specified executable program when trying to execute the SUBMIT statement, a runtime error occurs.
    If you omit the AND RETURN addition, all data and list levels of the calling program (the entire internal session) are deleted. After the called executable program has finished, control returns to the level from which you started the calling program.
    If you use AND RETURN, the system stores the data of the calling executable program and returns to the calling after processing the called program. The system resumes executing the calling program at the statement following the call.
    The SUBMIT statement has a set of additions <options> for passing data to the called program and specifying various other processing options. Some of them are described in the following sections:
    Have a look at below link. It will help you.
    http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

Maybe you are looking for

  • Dnt want Auto Multiple Ship Costs items for Same Vendor

    Hi All, I have a problem.. In my shipment my header as well as Legs are cost relevant. And i have given automatic determination of item categories in my shipment costs. Now the problem is when i have say 2 stages in my route den in my shipment costs

  • IBook won't load Firewire drive; "unknown device"

    That's the summation via System Profiler. It's a SmartDisk Firelite enclosure but I swapped the old 40 GB drive that failed for a new Seagate Momentus 80 GB drive. My G4 dualie recognizes the new SmartDisk setup fine. It loads immediately and I was a

  • My keys for F1 to F12 are messed up and I can't seem to fix it in the system pref.

    I can't seem to sync my F1 to F12 Keys to what they are supposed to do. I checked all the system preference settings, even set all to default and nothiung works. Can someone please help?

  • Batch rename in photos app?

    Now that Apple has forced us to move from iPhoto to the new Photos app in OSX 10.3, I can't find a way to batch rename like we could in iPhoto.  Am I missing something or did Apple simply decide we didn't need this feature any longer?

  • How do I mount a disk image on an eMac?

    Every blog I read says all I need to do is double click the image to mount it, but it just says "There is no default application specified to open the document " .exe" It gives me the option to chose a file but idk what to do. Please help.