Enhancing existing Abap code: using values that doesn't exist in table

Hi,<br><br>
I would like to enhance this code . My requirement is as follows.<br><br>
I have two tables  customer and product<br><br>
<pre>KNVP  customer master data table
Customer                            PF                Person
700008          YF     45555
700008          YQ     46666
700008          ZF     46666
700008          YM     49999
700008          ZQ     44444
700008          ZM     43333
T179 product hierarchy table*
product hier                     PF
1000014000          ZM     
1000015000          ZF     
1000033000          ZQ     
The current extractor is showing YM for all YPF values
Customer         Zperson          ZPF        YPF    YPerson
700008            46666              ZF          YM        49999
700008            43333              ZQ         YM        49999
700008            44444              ZM         YM        49999</pre>
<br><br>
Case 1:IF customer doesn't have Partner function value YQ in master data then partner function YF person and partner function should be use.
<br><br>
case 2: IF customer doesn't have Partner function value YF in master data then partner function YQ person and partner function should be use.
<br><br>
case3:IF customer doesn't have Partner function value YQ and YF in master data then partner function YM person and partner function should be use.
<br><br>
The tricky part is that YQ doesn't exist in T179 table
<br><br>
<pre>
LOOP AT T_DATA.
      ZIDX = SY-TABIX.
      CLEAR T179.
   Select partner function, assigned to current
   product hierarchy level 2
      SELECT * FROM T179
               WHERE  STUFE = '2'
               AND    PRODH = T_DATA-PRODH.
      ENDSELECT.
   Replace value with new partner function.
   by replacing first letter to 'Y'
      CONCATENATE 'Y' T179-ZZPARVW+1(1) INTO NEWPF.
   Try to find new sales employee with this new partner function
      CLEAR KNVP.
      SELECT * FROM  KNVP UP TO 1 ROWS
        WHERE  KUNNR  = T_DATA-KUNNR
        AND    VKORG  = T_DATA-VKORG
        AND    PARVW  = NEWPF.
      ENDSELECT.
      IF SY-SUBRC EQ 0.
   New partner found with this partner function
        T_DATA-ZPARVW = NEWPF.
        T_DATA-ZPERNR = KNVP-PERNR.
  ELSE.
            NEWPF = 'YM'.
   Try to find new sales employee with partner function 'YM'
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = NEWPF.
        ENDSELECT.
        T_DATA-ZPARVW = NEWPF.
        T_DATA-ZPERNR = KNVP-PERNR.
      ENDIF.
      MODIFY T_DATA INDEX ZIDX TRANSPORTING ZPARVW ZPERNR.
</pre>
<br><br>Edited by: Matt on Aug 24, 2010 9:31 AM - fixed formatting

Hi,
thanks for your input, I have written it like this and it is working well for YQ and YF partner functions but YM is not showing when both are missing.
LOOP AT T_DATA.
      ZIDX = SY-TABIX.
      CLEAR T179.
*    Select partner function, assigned to current
*    product hierarchy level 2
      SELECT * FROM T179
               WHERE  STUFE = '2'
               AND    PRODH = T_DATA-PRODH.
      ENDSELECT.
*    Replace value with new partner function.
*    by replacing first letter to 'Y'
      CONCATENATE 'Y' T179-ZZPARVW+1(1) INTO NEWPF.
IF SY-SUBRC EQ 0.
IF NEWPF EQ 'YF'.
      READ TABLE T_KNVP WITH KEY PARVW = 'YF'.
        IF SY-SUBRC EQ 0.  "YF exists in master data
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = 'YF'.
        ENDSELECT.
          T_DATA-ZPARVW = 'YF'.
          T_DATA-ZPERNR = KNVP-PERNR.
        ELSE.
        READ TABLE T_KNVP WITH KEY PARVW = 'YQ'.
        IF SY-SUBRC EQ 0. "YQ exists in master data
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = 'YQ'.
        ENDSELECT.
           T_DATA-ZPARVW = 'YQ'.
           T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
ENDIF.
ENDIF.
IF NEWPF EQ 'YQ'.
      READ TABLE T_KNVP WITH KEY PARVW = 'YQ'.
        IF SY-SUBRC EQ 0.  "YQ exists in master data
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = 'YQ'.
        ENDSELECT.
          T_DATA-ZPARVW = 'YQ'.
          T_DATA-ZPERNR = KNVP-PERNR.
        ELSE.
        READ TABLE T_KNVP WITH KEY PARVW = 'YF'.
        IF SY-SUBRC EQ 0. "YF exists in master data
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = 'YF'.
        ENDSELECT.
           T_DATA-ZPARVW = 'YF'.
           T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
ENDIF.
ENDIF.
      ELSE.
        NEWPF = 'YM'.
*    Try to find new sales employee with partner function 'YM'
        CLEAR KNVP.
        SELECT * FROM  KNVP UP TO 1 ROWS
          WHERE  KUNNR  = T_DATA-KUNNR
          AND    VKORG  = T_DATA-VKORG
          AND    PARVW  = NEWPF.
        ENDSELECT.
        T_DATA-ZPARVW = NEWPF.
        T_DATA-ZPERNR = KNVP-PERNR.
      ENDIF.
      MODIFY T_DATA INDEX ZIDX TRANSPORTING ZPARVW ZPERNR.
    ENDLOOP.
thanks
Edited by: Bhat Vaidya on Aug 30, 2010 1:31 PM

Similar Messages

  • Abap code used for reporting

    Hi Gurus;
    Can some one send me the abap codes used mainly for reporting OR can some one give me some sample code used in reporting. my mail id "[email protected]".

    smod > rsr0001 > EXIT_SAPLRRS0_001 > ZXRSRU01 >
    CASE I_VNAM.
    WHEN 'ZE_FPPT'.
        CALL FUNCTION 'Z_VAR_FP4'
          EXPORTING
            I_VNAM        = i_vnam
            I_STEP        = i_step
            I_T_VAR_RANGE = I_T_VAR_RANGE
          IMPORTING
            E_T_RANGE     = E_T_RANGE.
    FUNCTION Z_VAR_FP4.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_VNAM) LIKE  RSZGLOBV-VNAM
    *"     REFERENCE(I_STEP) TYPE  I DEFAULT 0
    *"     REFERENCE(I_T_VAR_RANGE) TYPE  RRS0_T_VAR_RANGE
    *"  EXPORTING
    *"     VALUE(E_T_RANGE) TYPE  RSR_T_RANGESID
    data: l_s_range type rsr_s_rangesid.
    data: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    data: year(4).
    data: mth(2).
    IF I_STEP = 2 .
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE
            ( VNAM = '0I_FPER' ).
          year = LOC_VAR_RANGE-HIGH+0(5).
          mth = LOC_VAR_RANGE-HIGH+5(2).
               if mth < 10.
            concatenate '0' mth into mth.
          endif.
          concatenate year '0' mth into L_S_RANGE-HIGH.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.
    Regards,
    BWer
    Assign points if helpful.
    Message was edited by: BWer

  • Need a java code using swing that can do master configuration

    I need a java code using swing that can do master configuration.For example, in the 1st screen it will show all configuration checke boxes . According to those selected check box, it will show the needed panels sequentially and finnaly it will update many xml files.

    TapasB wrote:
    I need a java code .......and I wish you much luck in creating it. Please come back if you have a specific question on a specific part of your code that is not working quite right.

  • ABAP code used in transaction SU01

    Hi all,
    Can anyone tell me that whether is there any method by which I can pass the user id and can know whether that user has the SAP_ALL profile or not.
    The above is done by using the transaction SU01,but I need the ABAP code that is being used in this transaction.
    Regards,
    Varun.

    YOu can query the table:
    UST04
    select single * from UST04 where BNAME = sy-uname
                                               and PROFILE = 'SAP_ALL'.
    if sy-subrc = 0.
    write:/ 'The User' sy-uname 'has SAP_ALL profile'.
    endif.
    Regards,
    Ravi

  • Enhancing 0FI_GL_4  - ABAP code is NOT working -  URGENT PLEASE ???

    Hi all,
        I want to enhance 0FI_GL_4 extractor with CHECT, RWBTR & PRIDT from PAYR table if VBELN of 0FI_GL_4  is not BLANK, with the following conditions:
    1.Load all the records of PAYRQ table into PAYRQ internal table LT_PAYRQ
    with matching BELNR, AUGBL & BUKRS from I_DTFIGL_4 internal table.
    2.Load all the records of PAYR table into PAYR internal table LT_PAYR
    with matching AUGBL & BUKRS from LT_PAYRQ internal table.
    3.Read PAYR internal table LT_PAYR with matching BELNR (from I_DTFIGL_4
          internal table) and fill the new fields  CHECT, RWBTR & PRIDT.
    The following the is ABAP code, but it is NOT working:
    DATA:I_DTFIGL_4 LIKE DTFIGL_4 OCCURS 0 WITH HEADER LINE,
         L_TABIX LIKE SY-TABIX.
    DATA: BEGIN OF LS_PAYRQ,
                 ZBUKR LIKE PAYRQ-ZBUKR,
                 BELNR LIKE PAYRQ-BELNR,
                 AUGBL LIKE PAYRQ-AUGBL,
             END OF LS_PAYRQ.
    DATA: LT_PAYRQ LIKE LS_PAYRQ OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF LS_PAYR,
                 VBLNR LIKE PAYR-VBLNR,
                 CHECT LIKE PAYR-CHECT,
                 RWBTR LIKE PAYR-RWBTR,
                 PRIDT LIKE PAYR-PRIDT,
             END OF LS_PAYR.
    DATA: LT_PAYR LIKE LS_PAYR OCCURS 0 WITH HEADER LINE.
    WHEN '0FI_GL_4'.
        I_DTFIGL_4 = C_T_DATA.
        SELECT BELNR   AUGBL  ZBUKR
          FROM PAYRQ
          INTO CORRESPONDING FIELDS OF TABLE LT_PAYRQ
          FOR ALL ENTRIES IN I_DTFIGL_4
          WHERE BELNR = I_DTFIGL_4-BELNR
            AND AUGBL = I_DTFIGL_4-AUGBL
            AND BUKRS = I_DTFIGL_4-BUKRS.
        SORT LT_PAYRQ BY BELNR.
        SELECT VBLNR CHECT RWBTR PRIDT
           FROM PAYR
           INTO CORRESPONDING FIELDS OF TABLE LT_PAYR
           FOR ALL ENTRIES IN LT_PAYRQ WHERE VBLNR = LT_PAYRQ-AUGBL
           AND ZBUKR = LT_PAYRQ-ZBUKR.
        SORT LT_PAYR BY VBLNR.
        LOOP AT C_T_DATA INTO I_DTFIGL_4.
            L_TABIX = SY-TABIX.
         IF NOT I_DTFIGL_4-VBELN IS INITIAL.     " IF BILLING DOCUMENT EXISTS
            READ TABLE LT_PAYR WITH KEY VBLNR = I_DTFIGL_4-BELNR.
            IF SY-SUBRC = 0.
               MOVE LT_PAYR-CHECT   TO  I_DTFIGL_4-ZZCHECT.
               MOVE LT_PAYR-RWBTR  TO  I_DTFIGL_4-ZZRWBTR.
               MOVE LT_PAYR-PRIDT    TO  I_DTFIGL_4-ZZPRIDT.
               MODIFY C_T_DATA FROM I_DTFIGL_4 INDEX L_TABIX.
            ENDIF.
            CLEAR:I_DTFIGL_4-ZZCHECT,I_DTFIGL_4-ZZRWBTR,I_DTFIGL_4-ZZPRIDT,
                  LT_PAYR,  LT_PAYRQ.
          ENDIF.
        ENDLOOP.
    Could you please find the problem with above ABAP code and correct it.
    Since I want to enhance it,  if VBELN is not Blank and do I have to move the IF condition (I_DTFIGL_4-VBELN IS INITIAL) to another location for better performance.
    Thanks,
    Venkat..

    Dear Gajesh,
    Please accept my thanks for your Spontaneous reply.
    Selection Screen data is given below.
    1 --> Material Number
    2 --> Inspection Lot Number
    3 --> Date of Lot Creation
    4--> Inspection Type
    Normally the clint will give the Inspection Type ie 4th input and Date of Lot creation ie 3rd Input (Range of Date).
    Please do the needful.
    With Best Regards,
    Raghu Sharma

  • How To debug ABAP code using sapui5 application on NWBC

    Hi All
    I am working on NWBC with SAP_PAO_HRPROFESSIONAL_3 Role. This role contains SAPUI5 application. I am trying debug the ABAP code called while executing this application.
    Please help me how to get into ABAP debugger while executing this application.
    Thank you
    Ujj

    HI Ujj,
    First thing to do is look at the role and see which UI5 application is being executed. The UI5 application will be running in the web container of NWBC, you can make it open in a standalone browser (hold down the CTRL key in NWBC and go to the Help Menu) and then turn on the debugging tools (F12) in the browser. There you will see which Gateway services are being called. You will need to set your ABAP breakpoint in the implementation of the Gateway services. Find the class in SE80.
    Hth,
    Simon

  • Abap code not working  - deleting based on master data table information

    Hi,
    I wrote a piece of code earlier which is working and during test we found out that it will be hard for the support guys to maintain because it was hard coded and there is possibility that users will include more code nums in the future
    sample code
    DELETE it_source WHERE /M/SOURCE EQ 'USA' AND
    /M/CODENUM NE '0999' AND
    /MCODENUM NE '0888' AND.
    Now I created a new InfoObject master data so that the support people can maintain the source and code number manually.
    master data table - the codenum is the key.
    XCODENUM    XSOURCE
    0999               IND01
    0888               IND01
    now I wrote this routine all the data gets deleted.
    tables /M/PGICTABLE.
    Data tab like /M/PGICTABLE occurs 0 with header line.
    Select * from /M/PGICTABLE into table tab where objvers = 'A'.
    if sy-subrc = 0.
    LOOP at tab.
    DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM NE tab-XCODENUM.
    ENDLOOP.
    Endif.
    But when I chage the sign to EQ, I get opposite values , Not what I require.
    DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM EQ tab-XCODENUM.
    Cube table that I want to extract from
    /M/SOURCE                             /M/CODENUM
    IND01                                       0999
    IND01                                       0888
    IND01                                       0555
    IND01                                       0444
    FRF01                                      0111
    I want to only the rows where the /M/CODENUM = 0999 and 0888 and i would also need FRF101
    and the rows in bold  should be deleted.
    thanks
    Edited by: Bhat Vaidya on Jun 17, 2010 12:38 PM

    It's obvious why it deletes all the records. Debug & get your answer i wont spoon feed
    Anyways on to achieve your requirement try this code:
    DATA:
          r_srce TYPE RANGE OF char5, "Range Table for Source
          s_srce LIKE LINE OF r_srce,
          r_code TYPE RANGE OF numc04,"Range table for Code
          s_code LIKE LINE OF r_code.
    s_srce-sign = s_code-sign = 'I'.
    s_srce-option = s_code-option = 'EQ'.
    * Populate the range tables using /M/PGICTABLE
    LOOP AT itab INTO wa.
      s_code-low = wa1-code.
      s_srce-low = wa1-srce.
      APPEND: s_code TO r_code,
              s_srce TO r_srce.
    ENDLOOP.
    DELETE ADJACENT DUPLICATES FROM:
    r_code COMPARING ALL FIELDS,
    r_srce COMPARING ALL FIELDS.
    * Delete from Cube
    DELETE it_source WHERE srce IN r_srce AND code IN r_code.

  • Can I use a inputHidden for javascript values that doesn't set the value?

    I have a hiddenInput field for each row in a datatable so I can restore default values to a date field with a javascript function. I am getting conversion errors because I don't have the right setters in the backing object - and I really don't want to put them there - but I don't want the tag to set the values! Is there any way to just set a hidden value somewhere for each row of a datatable but not have it try to set the value? Thanks in advance!

    I just realised that won't work because all the HTML tags will have the same name, whereas I need the dynamically generated suffix that a dataTable assigns to every element in the row i.e. '_id34', so I can reference the value in the javascript and compare it to entered values. Any more ideas? I am having huge memory problems when I'm submitting my form too, using up 2GB of mem and then dying! I'm not sure what's causing it, because it doesn't get as far as my action method code before it dies! It works for smaller tables but I need to be able to handle ~20 users with tables 4x the size I can process now without running out of memory :( Any help would be really really appreciated!!

  • Debug ABAP code used for ABAP mapping

    Hi Experts,
    I have worked on Abap mapping. I have executed the code in SE24 to acheive desired mapping and the desired output is also generated.
    attached below is a part of the code i have used:
    method IF_MAPPING~EXECUTE.
    * initialize iXML
      TYPE-POOLS: ixml.
      CLASS cl_ixml DEFINITION LOAD.
    * create main factory
      DATA: ixmlfactory TYPE REF TO if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    * create stream factory
      DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    * create input stream
      DATA: istream TYPE REF TO if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    * parse input document =================================================
    * initialize input document
      DATA: idocument TYPE REF TO if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    * parse input document
      DATA: iparser  TYPE REF TO if_ixml_parser.
      iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                            istream        = istream
                                            document       = idocument ).
      iparser->parse( ).
    I just want to debug and see if an input is provided how does each of these methods make a difference to it.
    I tried to input some value in the SOURCE parameter on executing the code but it is not working fine.
    Could you please suggest hiw i should go about so that i can see the exact way the input Xstring is affected by each of these methods in the debugger.
    Help will be appreciated.
    Many thanks,
    Neha
    Edited by: Neha Nagrani on Jul 7, 2008 11:46 AM

    Hi Neha,
    Write a Small Report as Folows:
    1.  Create your XMl payload of Type xSTRING.
    2.  Call the method EXECUTE
    Place a Breakpoint on the method. and then keep debugging inside.
    the SetParamter method is obviously called from inside.
    This is the Simplesrt Solution.
    Reward points if useful
    Regards,
    Abhishek

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • Valid license code for activation that doesn't work HELP!

    I had to reinstall CS3 back on to my computer after having to do a factory reset on the computer. I downloaded CS3 from Adobe.com since my CDs are in another state. After installation I go to enter my code for the programs and CS3 won't accept my VALID license code to activate the account. It worked perfectly fine before I had to reset my computer and it is currently installed on one other computer but I need it on this one! Please help! I talked with Adobe already and they said that since the product is outdated I needed to visit the forums to find an answer as to why my activation code won't work or if anyone can help with suggestions. Thank you!

    Contact serial number support by web chat.
    Mylenium

  • Obtain count of values, including the values that are not in the table

    I have values: 1,2,3,7,8,9
    and my table contain value 3,7,8,3
    I need get result of select
    -value- -count-
    -1-     -0-
    -2-     -0-
    -3-     -2-
    -7-     -1-
    -8-     -1-
    -9-     -0-
    I tried
    select value, count(value) from table where value in ('1','2','3','7','8','9') group by value
    but I get only
    -value- -count-
    -3-     -2-
    -7-     -1-
    -8-     -1-
    Thank you for help

    Thank you for help but this is not functional if values are text (varchar).Have you mentioned that ? In your example post you have mentioned only numeric values. Why don't you try yourself, When you have an working (? Oops, there is no version mentioned by OP, So may not be working) example ?
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> SELECT job,COUNT(job)
      2  FROM emp
      3  GROUP BY job;
    JOB       COUNT(JOB)
    CLERK              4
    SALESMAN           4
    PRESIDENT          1
    MANAGER            3
    ANALYST            2
    SQL> SELECT column_value,COUNT(job)
      2  FROM emp e, TABLE(sys.odciVARCHAR2list('CLERK','PROGRAMMER','SALESMAN'
      3                                        ,'SALESMAN','DBA','PRESIDENT','MANAGER'
      4                                        ,'Architect','ANALYST')) t
      5  WHERE e.job(+)=t.column_value
      6  GROUP BY column_value
      7  ORDER BY 1;
    COLUMN_VALUE
    COUNT(JOB)
    ANALYST
             2
    Architect
             0
    CLERK
             4
    COLUMN_VALUE
    COUNT(JOB)
    DBA
             0
    MANAGER
             3
    PRESIDENT
             1
    COLUMN_VALUE
    COUNT(JOB)
    PROGRAMMER
             0
    SALESMAN
             8

  • ABAP proxy code using internal table

    Hi XI guru's,
    Good Afternoon,
    My Scenario is ABAP Proxy to file using ztable.
    i am getting data from Sap R/3 data base as Ztable. using this Ztable i have to write ABAP Proxy code. I generated ABAP Proxy and mentioned all below.Please send me ABAP Proxy code using this details. This is very urgent. Please help me.
    ABAP proxy class:   zco_mioa_tata
    structure              :   zmt_tata
    structure                :   zdt_tata
    structure                :   zdt_tata_employee
    Table                :   zdt_tata_employee_tab
    Ztable                :   zcnu_proxy_table
    outbound structure:
    mt_tata
        employee
    thanks and regards
    sai

    Sai,
    I guess this will help you.
    1. Proxies can be a server proxy or client proxy. In our scenarios we require proxies to send or upload the data from/into SAP system.
    2. One more thing proxies can be used if your WAS &#8805; 6.2.
    3. Use Tcode SPROXY into R/3 system for proxy use.
    4. To send the data from R/3 system we use OUTBOUND PROXY. In Outbound proxy you will simply write an abap code to fetch the data from R/3 tables and then send it to XI. Below is the sample code to send the data from R/3 to XI.
    REPORT zblog_abap_proxy.
    DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
    CREATE OBJECT prxy.
    DATA it TYPE zblogemp_profile_msg.
    TRY.
    it-emp_profile_msg-emp_name = 'Sarvesh'.
    it-emp_profile_msg-empno = '01212'.
    it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
    CALL METHOD prxy->execute_asynchronous
    EXPORTING
    output = it.
    commit work.
    CATCH cx_ai_system_fault .
    DATA fault TYPE REF TO cx_ai_system_fault .
    CREATE OBJECT fault.
    WRITE :/ fault->errortext.
    ENDTRY.
    Receiver adapter configurations should be done in the integration directory and the necessary sender/receiver binding should be appropriately configured. We need not do any sender adapter configurations as we are using proxies.
    5. To receive data into R/3 system we use INBOUND PROXY. In this case data is picked up by XI and send it to R/3 system via XI adapter into proxy class. Inside the inbound proxy we careate an internal table to take the data from XI and then simply by using the ABAP code we update the data inot R/3 table. BAPI can also be used inside the proxy to update the data into r/3.
    I hope this will clear few doubts in proxy.
    Just go through these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
    ABAP Server Proxies By Siva Maranani
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    /people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    File to R/3 via ABAP Proxy with good example
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
    Generating java proxies..
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    /people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
    Synchronous Proxies:
    Outbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
    Inbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-%2bsales%2border%2bcreation
    Regards,
    Sarvesh

  • Can not see ABAP code of programs and FM using SE37, SE38, SE80

    Hi, all!
    When I try to open ABAP-code using transactions SE37, SE38, SE80, they don't display it. Instead it current mode hangs, but I can open another one.
    System ECC 6.0, SAP_ABA package SAPKA70021, GUI Patch 17.
    I have 2 laptops, one of them works with these transaction properly, another gives described problem. Other my colleagues don't have such problems.
    Can anybody help me to solve this problem?
    BR,
    Boris

    hi friend,
    I had the same problem the problem than you, the problem isn´t the gui, the probelm is the msxml parser .
    Follow the next sollution and you will solve your problem.
    http://scn.sap.com/thread/1853701
    My original problem was the "SAP signature theme" was black and with a lot of problems, changing to "Enjoy theme" everything appear works perfecly, but when I tryed to display any source code the screen was thinking without end.
    The problem is solved uninstalling any SAP software from your machine also msxml program from SAP and reinstalling first msxml 4.0 and msxml 6.0 after shut down install sap logon behind, when ended everything will work again.
    This my actual version and it works.
    kind regards,
    Miguel Angel Orihuela

  • IDOC: How to create child segment with abap code.

    Hi,
    I'am trying to write an abap code to create segments for an Idoc which structure is the following:
    ZLE_00060_DLVY
    >  E1EDL20
    > Z1DEL_CONS
    >Z1DEL_MAT_HEADER
    > Z1DEL_MAT
    > E1EDL20RET2
    > E1EDL22
    > E1EDL21
    > E1EDL23
    > E1EDL51
    I receive a sintax error: Error in IDoc with status 26 .
    Checking the result I note all segment at the same level and an error about the segment E1EDL22
    EDI: Syntax error in IDoc (segment cannot be identified)
         Message no. E0078
    Diagnosis
         The segment E1EDL22 does not occur at the current level of the basic
         type DELVRY05 (extension ZLE_00060_DLVY).
         This error can have several reasons:
         o   The segment E1EDL22 is assigned to a group whose header segment does
             not occur.
         o   The segment E1EDL22 does not exist in the syntax description of the
             basic type DELVRY05 (extension ZLE_00060_DLVY).
         o   The sequence of segments in the group in which the segment appears
             is incorrect.
         Previous errors ('mandatory' segment or group missing) may be due to
         this error.
    Procedure
         Please check the IDoc or the syntax description of the basic type
         DELVRY05 (extension ZLE_00060_DLVY).
    After the error I have:
    data records
    E1EDL20
    Z1DEL_CONS
    Z1DEL_MAT_HEADER
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    E1EDL20RET2
    E1EDL22
    E1EDL21
    Abap code:
            idoc_data-segnam = 'Z1DEL_CONS'.
            idoc_data-sdata = s_z1del_cons.
            append idoc_data.
              idoc_data-segnam = 'Z1DEL_MAT_HEADER'.
              s_z1del_mat_header-tsegment = 'MATERIAL'.
              idoc_data-sdata = s_z1del_mat_header.
              append idoc_data.
            clear idoc_data-sdata.                            <<<<<<<<<<< how to indent the structure because this is a child.
             idoc_data-sdata = s_Z1DEL_MAT.
             idoc_data-segnam = 'Z1DEL_MAT'.
             append idoc_data.
             idoc_data-segnam = 'E1EDL20RET2'.
             idoc_data-sdata = s_E1EDL20RET2.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL22'.
             idoc_data-sdata = s_e1edl22.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL21'.
             idoc_data-sdata = s_e1edl21.
             append idoc_data.
    Any help will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

    Hi,
    following in debugging mode the abap code of the INCLUDE ZXTRKU02 where is defined the TABLES IDOC_DATA STRUCTURE  EDIDD, I find that all field of the table IDOC_DATA are not set. More exactly my expectation is to find values for SEGNUM, HLEVEL, PSGNUM.
    In a few words I need to execute an enhancement, via abap code, of the struscure of the idoc before sending it out since I have a requirement to test this enhancement in my XI environment, receiving as input this ideoc modified.
    Then, I need to add a new segment and one child.
    Any suggestion will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

Maybe you are looking for

  • How can I see my document in the middle of the page ?

    Hi everyone, I just downloaded the trial of i-Work but I'm in trouble with Pages. Indeed I would like to see my white document, on which I'm writting, in the middle of my page. At the moment it is on the left, with grey on the right. And : 1- I don't

  • IPhone 4 not working after ios 5.1

    I upgraded to ios 5.1 on my iPhone 4, ever since the upgrade my phone stared resting/restarting turning off and on again, its self after a few minuets continually then eventually get black screen and nothing happens until the battery runs flat then i

  • How do you listen to the radio on a new nano I got for xmas?

    I opened up and read other forums about this topic...the nano itself says 'NO radio signal, please plug in headphones for reception"..well that doesnt work..others suggest we take them off of podcasts...thats a seperate page..it has a file for podcas

  • PDF file display on the browser

    Hi, I am using struts DispatchAction to display the existing file (on the server) on the web browser. My code works on FireFox and Google Chrome. But displays empty screen when executed on IE. Please refer to the Action class and kindly help me out w

  • Movie Inventory Management

    Movie Inventory Management Despite having computed for decades, I am very new to iPod and downloading music and movies. I understand that one cannot burn a DVD of a downloaded movie. Is that correct? So, what is the point of having the movie art if o