Output of the T-Code FBL5N to a Internal Table

Hi Guru's ,
My requirement is to get the output of a standard program (RFITEMAR) T-code FBL5N into an internal table in my Z program.
I tried to copy the standard program but , the includes are copied with standard names and some where it is taking the reference of the standard program and resulting into a dump after a I selesct ' Switch List ' from Menu ' Environment '
Please guide me for the same....
I don't want to spend time on writing the logic on which SAP has already worked.
Regards,
Archana W

Hi,
Problem arises due to the copying object during program copy to Z-Program.
It does not create any impact of copying standard Includes during copy.
You have to select all the check boxes during copy a program through standard program.
GO TO T.Code  SE38
Right the program name you want to copy.
GOTO MENU Option -> Program -> Select COPY,
It will show source and target program name.
Make Target Program as Z and clik OK.
It will show another scree for documentation and other object associated with Program.
Select all check boxes and click ok.
System automatically assigne all standard object and includes to your z-program.
after that you can do the changes in you z-program.
pass all the data displayed on screen into the internals after declaration.
Regds,
Anil

Similar Messages

  • Copy a certain row of data into the next row in a same internal table ??

    HI, guys.
    May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
    For example:-
    *at first...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln3   ebelp3   xblnr3
    *after that, become...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln2   ebelp2   xblnr4
    ebeln2   ebelp2   xblnr5
    ebeln3   ebelp3   xblnr3
    Thanks in advance.

    hi,
    If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
    so in this case,
    loop at itab1.
      v_index = sy-tabix.
      loop at itab2 into wa where pri_key = itab1-pri_key.
      v_index = v_index + 1.
      insert  wa into itab index v_index.
      endloop.
    endloop.
    Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

  • Store the vital info from the absence quota record in an internal table

    Hi experts,
    I want to detrmine if the Absence record’s (PA2001 rec) deduction from date (PA2001-BEGDA) and absence to date (PA2001-ENDDA) are permissible for the validity period of the Absence Quota record (the PA2006 rec).  If the quota’s deduction from date, PA2006-DESTA, is greater than the PA2001-BEGDA, we then need to identify this absence quota record for change and change the deduction from date, PA2006-DESTA, to be the same as PA2001-BEGDA.  Store the vital info from the absence quota record in an internal table and record the new date that the deduction from date that needs to be changed to.  The changes will be made via a BDC session.
    Please help me out...
    Thanks,
    Vicky

    This looks possible if we code it in 'dynamic action' table, but the BDC may not read it during run time.
    Do you still have this issue?
    Thanks
    Narasimha

  • How to find the number of columns in an internal table DYNAMICALLY ?

    Hi,
    How to find the number of columns in an internal table DYNAMICALLY ?
    Thanks and Regards,
    saleem.

    Hi,
    you can find the number of columns and their order using
    the <b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = sy-repid
       I_INTERNAL_TABNAME           = 'ITAB'
       I_INCLNAME                   = sy-repid
      changing
        ct_fieldcat                  = IT_FIELDCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif
    now describe your fieldcat . and find no of columns.
    and their order also..
    regards
    vijay

  • Spilt the number of records in a internal table

    Hi all,
            I have a requirement where i must spilt the number of records in my internal table itab .Say if i have 2000 records , i must spilt it taking the first 990 records and doing some posting using Bapi and again take the next 990 records and do the posting .Can some one help me out.
    Good answers will be rewarded with points.

    Hi,
    You can use these instructions using two internal tables, but please be aware to not forget any line.
    REFRESH my_table2.
    APPEND LINES OF my_table FROM 1 TO 990 TO my_table2.
    CALL FUNCTION 'BAPI'....
                 (with my_table2)
    REFRESH my_table2.
    APPEND LINES OF my_table FROM 991 TO my_table2.
    CALL FUNCTION 'BAPI'....
                 (with my_table2)
    Regards,
    Mathieu

  • Test.jsp not able to display the output from the java code.

    when i try to invoke http://localhost/papz/test.jsp
    I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
    <html>
    <head>
    <title>Test</title>
    <body>
    <%
    out.println("Hello World");
    %>
    asdfasdfasdf
    </body>
    </html>
    i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
    when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
    Any clues whats going on...?
    I followed the instructions...over and over again... but it doesnt seem to help.
    win nt 4.0
    apache 1.3.12
    jserv 1.1.1
    Pls help. Thanks

    Hi,
    Have you solved your problem?
    I4m trying to do the same, but I installed portal 30, then portal to go, and when I try to run test.jsp I get the following error:
    Request URI:/papz/test.jsp
    Exception:
    java.lang.NoSuchMethodError: oracle.jsp.util.JspUtil: method
    stripTarget(Ljava/lang/String;C)Ljava/lang/String; not found
    Thanks
    Pablo Lopera
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by NewBie:
    when i try to invoke http://localhost/papz/test.jsp
    I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
    <html>
    <head>
    <title>Test</title>
    <body>
    <%
    out.println("Hello World");
    %>
    asdfasdfasdf
    </body>
    </html>
    i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
    when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
    Any clues whats going on...?
    I followed the instructions...over and over again... but it doesnt seem to help.
    win nt 4.0
    apache 1.3.12
    jserv 1.1.1
    Pls help. Thanks<HR></BLOCKQUOTE>
    null

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • How to add the contents of a field of internal table.

    Hello Everybody,
    How to sum up the individual field from a internal table. Like i have a internal table that has menge field , I need to sum up the menge field for each matnr..
    exm : for each matnr there are 5 menge entries, I need to add all the menge fields and shud be put against the matnr .
    Thanks,

    Hi Khaleel,
    One more option is using the "collect" statement.....
    imagine in the internal table itab..we have 2 fields only..
    MATNR,MENGE,
    we have 2 internal tables itab1 and itab2...
    loop at itab1.
    collect itab1 to itab2.
    endloop.
    Action performed is ...for the same MATNR...menge gets added and saved as a single record...When matnr changes...new record is Appended
    another case is we have 3 fields in internal table
    MATNR,UNIT,MENGE
    imagine we hane the records
    Material1 KG  100
    Material1 LT   20
    Material1 LT   200
    MAterial2 KG 100
    in this case...the output will be
    Material1 KG 100
    Material1 LT  220
    MAterial2 KG 100
    Reason is that the fields before the addable value is checked for similarity..
    here field UNIT is also checked and also MATNR before adding up....
    Hope it gave you some alternative idea to proceed with....
    Reward if helpful
    Regards
    Byju

  • Submititng the program to another program  using internal table values

    Hi All,
    How to Submit from one program to another program using internal table values minimum 7 int tables without using the seletion screen
    thanks
    raj

    Hi All,
    Thank you very much for your inputs.
    i am facing another issue:
    For each 10,000 records it should trigger a job  (we are trying to call a program)  were the validation will be done only through the other program.
    please find the code mentioned below :
    TABLES : but000.
    DATA:  int_bp LIKE but000 OCCURS 0 WITH HEADER LINE.
    data released like BTCH0000-CHAR1.
    DATA: jobnumber LIKE tbtcjob-jobcount, " Job ID and
          jobname LIKE tbtcjob-jobname, " job name.
          startdate LIKE tbtcjob-sdlstrtdt, " Start-time
          starttime LIKE tbtcjob-sdlstrttm, " window specs.
          laststartdate LIKE tbtcjob-laststrtdt,
          laststarttime LIKE tbtcjob-laststrttm,
          job_released LIKE btch0000-char1. " JOB_CLOSE: Was job released?
    DATA : l1 TYPE i,
           b_size TYPE i,
           b_cursor TYPE cursor.
    INITIALIZATION.
      b_size = 5000.
    START-OF-SELECTION.
      OPEN CURSOR WITH HOLD b_cursor
         FOR
         SELECT *
         FROM but000
         WHERE bpkind = 'AA'.
      IF sy-subrc = 0.
        DO.
          FETCH NEXT CURSOR b_cursor INTO TABLE int_bp
                                               PACKAGE SIZE b_size.
    Note : here in this point  we are getting a dump for the second job trigger.
          IF sy-subrc = 0.
            CLEAR jobname.
            CONCATENATE sy-repid sy-datum sy-uzeit INTO jobname.
    export int_bp to memory id 'ABC'.
            CALL FUNCTION 'JOB_OPEN'
                 EXPORTING
                      jobname          = jobname
                 IMPORTING
                      jobcount         = jobnumber.
                EXCEPTIONS
                     cant_create_job  = 1
                     invalid_job_data = 2
                     jobname_missing  = 3
                     OTHERS           = 4
    CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
               authcknam = sy-uname
               jobname   = jobname
               jobcount  = jobnumber
               report    = 'YTEST_RRR'.
               variant   = lv_variant.
       SUBMIT ytest_rrr
          VIA JOB jobname NUMBER jobnumber
          AND RETURN.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
           event_periodic                    = 'X'
            jobcount                          = jobnumber
            jobname                           = jobname
            strtimmed                         = 'X'
          IMPORTING
            job_was_released                  = released
            else.
            EXIT.
          ENDIF.
        ENDDO.
    calling program :
    REPORT YTEST_RRR .
    data itab1 like but000 occurs 0 with header line.
    data l type i.
    import itab1 from memory id 'ABC' .
    describe table itab1 lines l.
    free memory id 'ABC'.
    write:/ 'total records are:', l.
    Please give your suggestion why its going for  dump in the second iteration.
    thanks in advance.

  • Dynamic XSLT source code generation based upon internal table

    Hi,
    Is there anyway to generate dynamic XSLT source code based upon final structure of output internal table and call dynamic generated XSLT in program?
    CALL TRANSFORMATION z_transformation
                PARAMETERS
                 p_shared_string = lo_shared_str_nodeset
                SOURCE XML g_sheet_data
                RESULT lt_data = i_data[].
    Source code example of XSLT transformation -
    <xsl:template match="/">
         <asx:abap version="1.0">
           <asx:values>
             <LT_DATA>   "Internal table
               <xsl:for-each select="ss:worksheet/ss:sheetData/ss:row">
                 <xsl:if test="position() &gt; 1">
                   <item>
                     <FIELD1>
                       <xsl:variable name="cell_id" select="concat('A', position())"/>
                       <xsl:variable name="v_index" select="ss:c[@r=$cell_id][@t='s']/ss:v"/>
                       <xsl:if test="$v_index">
                         <xsl:value-of select="$V_SHARED_STRING/sst/si[$v_index + 1]/t"/>
                       </xsl:if>
                       <xsl:if test="not($v_index)">
                         <xsl:value-of select="ss:c[@r=$cell_id]/ss:v"/>
                       </xsl:if>
                     </FIELD1>
                 </item>
                 </xsl:if>
               </xsl:for-each>
             </LT_DATA> "internal table
           </asx:values>
         </asx:abap>
       </xsl:template>
    </xsl:transform>

    In addition,
    We are converting binary data of excel from application server into internal table but currently we created two XSLT transformation to achieve this one for deleting name space and other for converting data into internal table format.
    We want to make our source code for future use also,Is there anyway to generate XSLT source code dynamically?Above mentioned code is snippet of data extracting which we are doing but this transformation is hard coded.
    Any help is appreciated.
    BR,
    Praveen

  • Selecting multiple records from the list and append it into internal table.

    hi
    there is a list of 10 records in the output screen with check boxes. if the user select any 3 records then those records should get appended in some other internal table of same structure.
    this is the requirement. can anybody help me it is very urgent.
    regards
    sami

    Hi,
    Loop at the internal table which contains the value in table control and move it to a work area. apend the work area to the next internal table. Like:
    loop at it1 into wa1 where sel = 'X'.
    append wa1 to it2.
    endloop.
    or
    loop at it1 into wa1.
    if wa1-sel = 'X'.
    append wa1 to it2.
    endif.
    endloop.
    Regards,
    RM

  • Changing the order of fields in an internal table

    Hi all,
    I'm using field symbol as internal table. this table has got a standard database structure.
    I want to make the 3rd column of this internal table as 1st colums keeping rest of the columns as it is.
    Is there any way to do this?
    Thanks,
    Anil.

    Hi
        Instead of directly taking the type as a standard structure , declare the FS  internal table as type of types structure.
    Data: fs_scarr like type_s_scarr.
    FIELD-SYMBOLS <scarr2> TYPE fs_scarr
    In the types put the third column as first one and use into corresponding in select query
    or else
    while displaying the internal table change the order of the columns
    Loop at itab into fs_itab.
    write : col3
    col2
    col4
    endloop.
    Thanks,
    Viquar Iqbal

  • Format data in the flat file while downloading from internal table

    Just I used 'GUI_DOWNLOAD' with WRITE_FIELD_SEPARATOR = 'X'. In my case one of the field contains large quantity. Bcoz of this value , it pushes the remaining filed position values in that particular row. The fields in the internal table refers the stadard data elements.I need the field values should be under corresponding field names.Can anyone help me?

    Hi,
    declare another internal table in the format in which you want to download .
    say itab_text.
    itab is your orginal internal table .
    than loop at itab.
    MOVE-CORRESPONDING Itab TO Itab_text.
    APPEND ITab_text.
    endloop.
    now pass the itab_text to gui_download.
    Thanks

  • SUBMIT and return the value of that report into internal table

    Dear all,
    I have a requirement. I want to submit a report and return the value of that report into my internal table.
    How to do this.
    Pl. guide.

    Hi Vidhya,
    Below links from SAP help will resolve your issue.
    http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3bde358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/content.htm
    Edited by: Harsh Bhalla on Jan 2, 2010 11:54 AM

  • How to get the NameTab Structure(X031L) for Dynamic internal table?

    when we pass standard table to the FM 'DD_GET_NAMETAB' we will get the
    nametab structure(x031l), like this i want to get the same structure for
    dynamic internal  table . how can I achieve this
    please help me...

    Hi,
    try this method
    REPORT zmaschl_create_data_dynamic .
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    Build fieldcat
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'       EXPORTING           i_structure_name = 'SYST'       CHANGING           ct_fieldcat      = it_fcat[].   LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.        MOVE-CORRESPONDING is_fcat TO is_fieldcat.        is_fieldcat-fieldname = is_fcat-fieldname.        is_fieldcat-ref_field = is_fcat-fieldname.        is_fieldcat-ref_table = is_fcat-ref_tabname.        APPEND is_fieldcat TO it_fieldcat.   ENDLOOP.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table       EXPORTING        it_fieldcatalog = it_fieldcat       IMPORTING        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.CREATE DATA new_line LIKE LINE OF <l_table>.ASSIGN new_line->* TO <l_line>.
    Test it...
       DO 30 TIMES.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          <l_field> = sy-index.
          INSERT <l_line> INTO TABLE <l_table>.
       ENDDO.
       LOOP AT <l_table> ASSIGNING <l_line>.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          WRITE <l_field>.
       ENDLOOP.

Maybe you are looking for

  • Window manual resizing issues

    Since Yosemite cursor frequently fails to switch (to double arrow) when mouse hovering on window's edges. Resizing actually works with the standard cursor arrow but it's not natural and very annoying. So far I've noticed this with Preview and Chrome.

  • FYI... The sort function in  Import module

    Is not functioning properly, I have been unable to sort based on anything but an initial filemname sort.

  • How Do I Disable .Mac in System Preferences?

    Is there some way to disable or lock .Mac in system preferences? I need to prevent users from moving data from Mac to .Mac account.

  • Attaching .olb and .pll libraries using the frmcmp executable file

    Hi , I use the frmcmp (Forms Compiler) executable file in order to batch compile and create the .fmx files in Windows . All forms do not succeed( .fmx files are not created , except these ones which does not have .olb, .pll libs attached to them) bec

  • ITouch screen frozen

    I updated my 3rd gen iTouch & now the screen is frozen. The diagnostic test says the iTouch is not connected, but it is. I was able to turn it off by prssing the power switch & home together. Now it show a picture of a cable going to iTunes. The iTou