Sap bw abap code meaning

Hello,
Can someone please explain what below code do? Is this deleting records from loading into transfer structure?  This was added in the start routine of transfer rule for Purchasing ODS.
APPEND LINES OF DATAPAK TO I_DATAPAK
DELETE I_DATAPAK WHERE ROCANCEL <> 'R'.
LOOP AT I_DATAPAK INTO LS_DATAPAK.
IF LS_DATAPAK-ROCANCEL = 'R'.
   LS_DATAPAK-LOEKZ = 'L'.
       LS_DATAPAK-ROCANCEL = SPACE.
   MODIFY I_DATAPAK FROM LS_DATAPAK.
   ENDIF.
  ENDLOOP.
Please advise,
Thanks

Hi,
data packets data moved to internal table and delete the the data which was rocancel<> R.
<> = not eaqual to.
So now your internal table have the data which rocancel = R only.
So now again changing internal table data as below.
IF LS_DATAPAK-ROCANCEL = 'R'. then change the loekz and rocancel values as below.
   LS_DATAPAK-LOEKZ = 'L'.
       LS_DATAPAK-ROCANCEL = SPACE.
All changes are modified and moved to target structure
   MODIFY I_DATAPAK FROM LS_DATAPAK.
To understand more, take your abaper help and understand the coding part.
Thanks.

Similar Messages

  • How to Use CMOD and SMOD in SAP using ABAP Code

    Hello anyone,
      Please help me How to use CMOD and SMOD in SAP using ABAP code.
    Give Me Some Sample Example.
    Mail ID: [email protected]
    Thanks,
    Regards,
    S.Muthu,
    SAP Developer.

    Hi,
    User Exits.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    customer exits
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Menu Exit.
    http://www.sappoint.com/abap/spmp.pdf
    http://www.sappoint.com/abap/userexit.pdf
    http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
    http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html

  • SAP Query :: ABAP Code Help

    Hi,
    I have created a query which reads a material Table and has consumption by date. What I want the report to do is show me a total number of PO's by month. i.e. below
    Any idea how can I go about this? I can understand ABAP but don't know how to put it in buckets via a query i know i have to create 12 fields called Jan, Feb, March, April etc but need the code to put date in the tables by month
    E.g.
    Material                          January    Feb   March   April       etc
    MAT1                                 23         22      21       11
    MAT2                                 35         67      89       33         etc
    THanks

    ABAP Program created

  • Transfer of flat file from Oracle to SAP from ABAP code

    Hi Expert,
    I have to write a code in ABAP that call the Oracle procedure and it transfer the file generated by Oracle procedure. To call the Oracle procedure from ABAP with passing multiple parameters that i know the syntax but how to transfer the flat file (output file in txt format) generated by Oracle Procedure?
    If any one have sample code can you please give me.
    *Note: Oracle procedure is running in the different sever (Legacy system)*
    Help is appreciated.
    Thanks
    Ritesh

    Hello Ritesh,
    Please check the link below.
    http://download.oracle.com/docs/cd/B28359_01/owb.111/b31278/ref_def_flatfiles.htm
    This may provide an overview for your requirement.
    Please mark as answered if my solution helps in resolving your issue.
    Thanks
    Kind regards,
    Himanshu Limaye

  • What are the acceptable Sap methods/steps to change standard SAP/Abap code?

    To you Sap experts:
    Can you point me to Sap document  that lists the acceptable methods to follow when modifing SAP standard  (abap code).  We are on release 4..7.  
    I assume there is a best practice guide if you have to modify standard Sap code of what to do and don't do.  Ex:. Field exit, CMOD, SMOD... Thanks for assistance.

    Hi,
        You can implement your own logic using User Exits (which includes function module exits, screen exits, field exits and menu exits), Badi's, Enhancement points and Business Transaction, Events.
    Thanks,
    Srinivasa Rada

  • Execute ABAP Code Inspector from Outside of SAP

    Hi all...
    For reporting purpose, I would like to use ABAP Code Inspector (transaction SCI) for generating output as a file, it should call from outside of SAP through RFC function module and generate the list (output) as flat file (or XML), does anyone have been done with similar work like this? I wonder if you could share your experience with me...
    thanks in advance,
    yayan irianto.

    I managed to set up the variant, however found a problem.
    I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.
    SELECT + INTO *
    SELECT SINGLE + INTO *
    However following statements were detected.
    SELECT * INTO TABLE IT_DRAW FROM DRAW.
    SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.
    SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.
    SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.
    It's because + means one ABAP token in the code inspector.
    Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ?

  • LKM SAP BW to Oracle (SQLLDR) generates sintax error in ABAP code.

    Hi Experts,
    We are installing a SAP BW KM's in ODI 11g.
    Actually, we are able to make reverse ingeneering succesfully.
    Now we want to use the LKM in order to extract SAP data.
    The KM fails, in step Generate ABAP Code. The code is uploaded to SAP system but with sintaxis errors.
    That's the beginning of the SAPAbapExecuteOpenTool_8001_7001.log.
    +##################################################+
    +############ Open Tool Logger ####################+
    +##################################################+
    +############ Upload value: 1+
    +############ Execute value: 1+
    +############ BASE RKM FLAG: 0+
    +############ ZRFC_RUN_INSTALL: 1+
    +############ Abap Function Name: ZODI_8001_7001+
    +############ Sap Host Name: XXXXXXXX+
    +############ Sap User Name: XXXX+
    +############ Sap password: ********+
    +############ Sap Client: 100+
    +############ Sap language: ES+
    +############ Sap system no: 00+
    +############ Sap Connection Pool Name: SAP_ODI_LKM_POOL_GLOBAL+
    +############ Sap Connection Pool Size: 10+
    +############ Sap Function group name: ZODIBW_LKM_FGRP+
    +############ File Delimiter:+
    +############ File Name: ZODI_8001_7001.txt+
    +############ FTP Host: XXXXXXXXX+
    +############ FTP User: ftpbi+
    +############ FTP Password: ********+
    +############ FTP Passive Mode: 1+
    +############ FTP Transfer Time out: 100000+
    +############ User abap parameter names: IV_DELIMITER,CHAR1;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_REQUID_L,RSSID;IV_REQUID_H,RSSID+
    +############ Abap rfc table parameters: RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2+
    +############ Log File Name: /tmp/SAPAbapExecuteOpenTool_8001_7001.log+
    +############ OpenHub Path: /tmp/+
    +############ Delta Extraction First Request ID : 0+
    +############ Delta Extraction Last Request ID : 0+
    +############ SAP Development Class : ZODIBW_PCKG+
    +############ Max Row Count :+
    +############ Fetch Batch Size :+
    +############ Hash Value Marker: HVM+
    +############ Generated Program:+
    *** ODS DSO extraction
    TYPES: BEGIN OF ty_final,
    +/BIC/AZOFI_UTE00_/BIC/ZFI_SOCOR+
    TYPE
    +/BIC/AZOFI_UTE00-/BIC/ZFI_SOCOR,+
    +/BIC/AZOFI_UTE00_SOURSYSTEM+
    TYPE
    +/BIC/AZOFI_UTE00-SOURSYSTEM,+
    END OF ty_final.
    In the SAP GUI shows a sintaxis error.
    Functions Module ZODI_8001_7001. line 25
    The name "/BIC/AZOFI_UTE00_/BIC/ZFI_SOCOR" is longer that allowed.
    +30 characters.+
    Really the TYPE "/BIC/AZOFI_UTE00_/BIC/ZFI_SOCOR" has 31 characters.
    The sufix "/BIC/" is the "NAMESPACE", a SAP grouping concept.
    AZOFI_UTE00 is a table name.
    ZFI_SOCOR is a column name.
    Are this sufix correct in the APAP code?
    Has anyone had that problem?
    Any comment will be wellcome.
    Thank's in advance.

    Hi Somchai,
    r U able to resolve ur issue ..........i'm also struck there at the same point.
    I am using shared folder for file transfer and my error message is
    java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset\\<hostname>\bi-interface$\ZODI_11001_12001_GLOBAL.txt
    Thanks.
    Edited by: Drona on Mar 26, 2012 7:25 AM

  • How to read a mail from sap inbox thru abap code?

    how to read a mail from sap INBOX thru abap code? can anyone tell me the technical approach? I NEED TO READ A MAIL and then need to pass the parameters to a bapi.
    Message was edited by:
            shahid mohammed syed

    Hi SSM,
    Did you manage to have your program working? I also have same requirement. I tried standard FM and BAPI but I always encounter authorization error when I tried accessing other user's mail. Thanks.
    Regards,
    Ryan

  • SAP Query Custom Field with ABAP Code

    Hi All,
    I have a custom field in my SAP query which has some ABAP code under it. The code finally writes some value to a variable. My question is do i need to explicitly link the variable in the ABAP code to the custom field OR it's done automatically. For some reason i don't see any value for this custom field. Thanks.

    Thanks Sandra

  • Abap code for sap exit variables?

    Hi,
    i) Where can I find the abap code for SAP exit variables
    OP_KEYDT used for the net due date
    OP_KEYD2 used for the posting date
    OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
    Based on the Net Due Date, which  is key date(0NETDUEDATE),  entered by the user at runtime, the posting date and celaring date are populated.
    II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom  Net Due Date(ZNETDUEDATE).And this date is populated to posting date and  clearing date variables.
    How do we acheive that.
    Thanks.

    Please tell how u solved ur issue i have the same scenario to be do.

  • ABAP  Code for SAP exit varaibles?

    Hi,
    i) Where can I find the abap code for SAP exit variables
    OP_KEYDT used for the net due date
    OP_KEYD2 used for the posting date
    OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
    Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
    II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
    How do we acheive that.
    Thanks.

    Hi Kumar,
    Try this below mentioned example where default date is current date.
    Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).
    Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.
    Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.
    Step4: Sample code to populate.
    WHEN 'CUR_DATE'.
    Data : l_p_range_SSS TYPE rrrangesid.
    IF I_STEP = 1.
    l_p_range_SSS-Low = sy-datum.
    l_p_range_SSS-Sign = 'I'.
    l_p_range_SSS-Opt = 'EQ'.
    APPEND l_p_range_SSS TO e_t_range.
    Endif.
    The following values are valid for I_STEP:
    · I_STEP = 1
    Call up takes place directly before variable entry
    · I_STEP = 2
    Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
    · I_STEP = 3
    In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
    · I_STEP = 0
    The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.
    Also, refer this link..
    http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    Cheers,
    Allen

  • How to see the ABAP Code behind SAP Exit Variables.

    Hi Everyone.
    I was wondering if anyone could help me with the steps to see the ABAP Code behind a SAP Exit Variable.
    Sometime back I remember of going to Transaction SE37 - Function Module and give the Variable name,
    Eg: 0F_ADAY, Hit F4 or something like that and was able to see the ABAP Code/Function Module/Exit written for that Variable.same
    But today I tried to do the same thing to see the code for Variable 0P_FVAEX but I was NOT able to see it.
    I think I am missing something.
    Can someone help me recollect what I am missing.
    Thank You for your time
    NOVICE

    Hi bi novice,
    big sorry for the late reply!
    The following variables are defined in function module RREX_VARIABLE_EXIT as case statement:
    '0CMONTH', '0CWEEK', '0CYEAR', '0CQUART', '0DAT', '0CWD', '0FYEAR', '0FPER', '0FYTCFP',
    '0FYTLFP', '0FYTCD', '0CYTCM', '0CYTLM', '0CYTCD', '0LYTCLD', '0CMONTHT', '0CWEEKT', '0CYEART', '0CQUARTT', '0DATT', '0FYEART', '0FPERT'
    Best regards,
    Andreas

  • Is it possible to write an abap code be SAP SQL query.(ECC 6)

    hello guys,
    Is it possible to write an abap code be SAP SQL query.
    Scenario : table A has a field say f1 of length 10 and table B has a field say s1 of lenght 20. in sap sql i am able to link all the other tables but i am not able to link
    table Af1 --->Table Bs1. as the length doesnot match. so is it possibel that using abap code I can pick 10 characters from table A field f1 adjust it to 20 characters using abap and map it to field s1 of table B.
    Please let me know how to accomplish this if possible.
    thanks in advance!!

    Herm,
    Adding code is done in the infoset.
    Please do following:
    > Goto SQ02
    > Type in the infoset that the basis for your query, <change>
    > Press <code> OR <shift><f8>
    > Tou'll see 4 tabs: Extras, Selections, Code, Enhancements.
    > GoTo tab Code
    > Choose the coding section (<f4> gives you an overview)
    > Enter the code.
    You may set a breakpoint to see what the query in SQ01 will do with it.
    Succes!
    Frank

  • Deployment : Exporting and importing a ABAP code to other SAP Server

    Hello Expert,
    I am very new to SAP ABAP. My query is , If we write a code in user exit on one SAP server and if we need to deploy the same on other SAP server who are not tightly coupled with each other , How should we do??
    Is there any way to export and import the code?? How do we deliver the code if anyone wants that code? Is there any way to deliver the code other than manual copy and paste??
    Any idea??
    Thanks,
    Prashant

    Hi,
    Check this.May be this can help you.
    http://www.sap-basis-abap.com/sapac008.htm
    http://www.sap-press.de/forum/gp/themaID-5/zeige-12302/thread
    Message was edited by: Jayanthi Jayaraman

  • Adding the ABAP code to SAP Query to support Query's ALV Double click.

    Hi, Expert.
    I need to add some ABAP Code into SAP Query (or Infoset) to support the double click event on ALV cell of result of query.
    Is it possible & How to do ?
    Thank you very much.
    Best Regard
    Nattapash C.

    Hi, Gautham.
    I've put BREAK-POINT in all code section e.g. INITIALIZATION, END-OF-SELECTION..
    I found there are some section for add code that will be executed when query is processing before output data to ALV.
    What I need to know is Where I can input the code after ALV output. For support the Double Click Event on Query's ALV cell.
    Best Regard,
    Nattapash C.

Maybe you are looking for