How to fetch the data to the internal table with out using mandt

Hi all,
Iam giving my code please observer... and give me the reasonable solution.
  t_mar LIKE STANDARD TABLE OF z_mar.
SELECT  mandt
         werks                         " Plant
         lifnr                         " Vendor
    FROM z_mar
    INTO TABLE t_mar
where sal = 2000.
By removing MANDT from select query, it is going to dump.
ex:
   SELECT 
          werks                         " Plant
          lifnr                         " Vendor
     FROM z_mar
     INTO TABLE t_mar
where sal = 2000.
> Now it is going to dump ( here i removed the mandt field ).
Please give me a solution to fetch the data by removing mandt in select statement, with out chaning the internal table structure.
Thanks,
Ravi

hi Ravi,
i also had to avoid move-corresponding and the following is what i did...its extra work and goes around but it will
do the needed work..............
t_mar LIKE STANDARD TABLE OF z_mar.
SELECT *
FROM z_mar
INTO TABLE t_mar
where sal = 2000.
the above gets you all the fields ...but if you still want to narrow it down to just two fields
*****Declaring structure with 2 fields
data:begin of fs_data.
data:werks type z_mar-werks,
     lifnr type z_mar-lifnr ,
data:end of fs_data.
*******internal table of above
data:int_data like fs_data occurs 0 with headerline.
*****moving the only 2 required fields
loop at t_mar.
t_mar-werks  = int_data-werks.
t_mar-lifnr  = int_data-lifnr.
append int_data.
endloop.
Hope you found it useful...
Regards
Bx

Similar Messages

  • How to Read the internal table for the data download from the spool

    HI all,
    I have one issue regarding the spool ,we are getting the correct output as per requirement of  user but when we send the same to the user in pdf format they did notget the same.
    they are telling that the due date is missing from the pdf.
    Please advice me how to track the internal  table for the spool data converted intopdf in a readable format.
    the FM used for the above task is : 
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Please reply if any one worked on the same.
    Thanks in advance.
    Gaurav,

    Hi Wang,
    Please let me know how you solved your question.
    Points will be rewarded.
    Thanks,
    Arun.

  • How to import the internal table into subroutine as parameter

    how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine

    Hi Yong,
    try this:
    parameters: p_tabnm like dd03l-tabname.
    field-symbols: <fs_tabname> type standard table.
    data: itab_ref type ref to data.
    create data itab_ref type standard table of (p_tabnm)
                         with default key.
    assign itab_ref->* to <fs_tabname>.
    select * from (p_tabnm) into table <fs_tabname>.
    perform subroutine tables <fs_tabname>
                       using p_tabnm.
    *&      Form  subroutine
          text
         -->P_<FS_TABNAME>  text
         -->P_P_TABNM  text
    form subroutine  tables   p_tabname type standard table
                     using    p_tabnm.
    Here p_tabname already has the structure of the table you gave as input
    parameter
    endform.                    " subroutine

  • Upload data to an internal table with Services of the Table Tool

    Hi,
    I'm trying to upload data to an internal table with the table with the new abap debugger but I can see the option in Services of the Table Tool. I see the information in this sap link and also I saw some screen shot in other pages.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/49/2db60934e414d0e10000000a42189b/content.htm
    Is this option depends the SAP version or the patch version or I need to configure the debugger?

    Hi,
    I used the statement
    SPLIT i_file AT '|' INTO TABLE It_file.
    But it is overwriting each row but not appending to the internal table while passing do and enddo.
    Actually my requirement is download the pipe delimited text file and sent an XLS attachment to the
    distribution mail id's.
    I know sending the mails by using the FM.
    But I need all data from the file line by line and pass to the Mail sending function module.
    Can you help me in acheiving  this.
    Regards
    Jay

  • How to print the list outout with out getting output?

    How to print the list outout with out getting output?
    My requirement is that when i exicute the program the list output has to print with out getting output list display on the screen.
    if possible cana anyone share the code....
    Phani,

    See this Sample Program.
    DATA: PARAMS LIKE PRI_PARAMS,
          DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LT50'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT ... TO SAP-SPOOL'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = ' '
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Awrd POints If useful
    Bhupal

  • Declare the internal table with only one 10 character  field and use

    Hi,
    I want to declare the internal table with only one 10 character  field and use.
    Jaya

    Hi,
    Go ahead. U can declare IT with only one field
    Example:
    data: begin of zcustlist occurs 1000,
                   custmer(10)  type c,
             end of zcustlist.
    Narendra Reddy.
    Edited by: Narendra Reddy C on Aug 8, 2008 11:39 AM

  • Downloading the internal table with header to FTP folder

    Hi All,
    I have one requirement in downloading the internal table details with the fixed header line to FTP folder. The header line having the fixed text of 425 characters length.
    Note: We are not suppose to use WS_DOWNLOAD and GUI_DOWNLOAD function modules.
    Thanks in advance for your reply.
    Regards
    Kamini.

    Hi,
    I can download the internal table details successfully to FTP folder using the FTP function modules like(FTP_CONNECT, FTP_COMMAND , FTP_R/3_TO_SERVER and FTP_DISCONNECT). Here my problem is I am unable to download the internation table with some header text.
    You can see the format (example) of file to be download.
    Here I can successfully download the below details without the header. But I am unable to download with header line. Could you please suggest me.
    seq_no|record_action|trans_date|sku|description|
    1|N|2008-01-03 07:52:31|TTASA5025CBO     
    2|N|2008-01-03 10:28:33|411014        
    3|N|2008-01-03 10:01:03|TTASA6030CBO  
    4|N|2008-01-03 10:01:15|TTASA6630CBO
    5|N|2008-01-03 10:01:25|TTASA7035CBO 
    6|N|2008-01-08 16:57:39|TT6G       
    Regards
    Kamini.

  • How to get the line in the template (smartform) with out using under score

    Hi,
         How to get the line in the template (smartform) with out using under score,
         and how to print the box (line the check box - small squre box (which is used ot mark the tick by the user in front of the item).
         Please provide the valueble answer as early as possible.
    Thanks,
    Ravi

    Hi Ravi,
    Line -
    Use a SMATSTYLE for this purpose.in the smartstyle create a paragraph or character with underline atribute.Then call the smartstyle in the text.
    Search SDN with Key <b>UNDERSCORE</b>.. will get few more posts on the same.
    For Checkbox - refer link
    Re: Quick Question on Smartforms
    Re: putting tick mark into check box in smartform
    Reward points if this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • Deletion of duplicates in the table with out using rowid

    How can I delete duplicates in the table with out using ROWID .

    hi
    sleect count(coulmnname),columnname from table
    group by columnname
    having count(columnname) > 1;
    find the primary key of the table
    apply the below query
    delete from table
    where (primary key,repeated column name )
    not in
    ( select min(primary key), repeated column
    from employee group by repeated column );
    use this in the primary key column use empid ,,,the repated column is ename
    empid ename
    1 sankar
    2 sankar
    try this one

  • Internal table with out header line

    Hi friends,
    Can u send me code for internal table with out header line : how to declare ,how to populate data and how to access the data
    Regards,
    vijay

    Hi Vijay
    There are several ways to declare an internal table without header line:
    A) You can define a type table
    TYPES: BEGIN OF TY_ITAB OCCURS 0,
            INCLUDE STRUCTURE ZTABLE.
    TYPES: END   OF TY_ITAB.
    and then your intrnal table:
    DATA: ITAB TYPE TY_ITAB.
    B) DATA: ITAB TYPE/LIKE STANDARD TABLE OF ZTABLE.
    C) DATA: ITAB TYPE/LIKE ZTABLE OCCURS 0.
    All these ways create a STANDARD TABLE
    You can create other types of internal table, for example SORTED TABLE or HASHED TABLE.
    These kinds of table can allow to improve the performance because they use different rules to read the data.
    When it wants to manage a table without header line, it need a work area, it has to have the same structure of table.
    DATA: WA LIKE ZTABLE.
    DATA: T_ZTABLE LIKE STANDARD TABLE OF ZTABLE.
    A) To insert the record:
    If you use INTO TABLE option you don't need workarea
    SELECT * FROM ZTABLE INTO TABLE T_ZTABLE
                                      WHERE FIELD1 = 'Z001'
                                        AND FIELD2 = '2006'.
    but if you want to append a single record:
    SELECT * FROM ZTABLE INTO wa WHERE FIELD1 = 'Z001'
                                   AND FIELD2 = '2006'.
    APPEND WA TO T_ZTABLE.
    ENDSELECT.
    Now you need workarea.
    B) To read data: you need always a workarea:
    LOOP AT T_ZTABLE INTO WA WHERE ....
      WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDIF.
    Anyway if you want to know only if a record exists, you can use the TRANSPORTING NO FIELDS option, in this case it doesn't need a workarea.
    READ T_ZTABLE WITH KEY FIELD3 = '0000000001'
                                      TRANSPORTING NO FIELDS.
    IF SY-SUBRC = 0.
    WRITE 'OK'.
    ENDIF.
    C) To update the data: it always needs a workarea
    LOOP AT T_ZTABLE INTO WA WHERE FIELD3 = '0000000001'.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA INDEX SY-TABIX
    ENDIF.
    AT the end you can use the internal table to update database:
    MODIFY/UPDATE/INSERT ZTABLE FROM T_ZTABLE.
    See Help online for key words DATA, you can find out more details.
    Max
    Message was edited by: max bianchi

  • How can i invoke a file chooser dialog box with out using input type=file

    how can i invoke a file chooser dialog box with out using <input type=file> can any one help me mail me to [email protected]

    You could use an applet...
    Or maybe Javascript has some way to do it.

  • How to pass the internal table data to smartforms

    Hi Gurus,
    I have a problem in passing the internal table data to the smartforms. In the print program
    I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
    CALL FUNCTION fm_name
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = T_SSFCTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = T_SSFCOMPOP
        USER_SETTINGS              = ' '
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        LT_PRDLBL                 = LT_PRDLBL1
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    In the print program I had defined the internal tables like
    Data: lt_prdlbl  type standard table of zprdlbl.
    Data: Begin of lt_prdlbl1 occurs 0.
            include structure zprdlbl.
    Data: End of lt_prdlbl1.
    How do I define the internal table in the smartform to get the values printed in the smartform?.
    <REMOVED BY MODERATOR>
    Thanks,
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PM

    Nehal,
    Thanks for quick response.
    In the smartform under the Form Interface->Tables tab
    I had defined
    LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
    In the main window I have created LOOP, in which I have ticked the internal table and
    LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
    &LT_PRDLBL-XXXX&.
    I am able to get the print but the data is not printing.
    Please help me with this.
    Thanks,

  • How to Pass the internal table data?

    DearAll,
    How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
    regards.

    Hi ,
    In the onInputProcessing event of the first page , write the following code...
    call method NAVIGATION->SET_PARAMETER exporting
        name = 'it_filt_cur'
        value = it_filt_cur.
    Here it_filt_cur is internal table.
              NAVIGATION->GOTO_PAGE('next.htm').
    In the next page , you can make the internal table as auto in the attributes.
    Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
    Regards,
    Laxman Nayak.
    Message was edited by: Laxman  Nayak

  • How to print the internal tables in grid format

    i have an internal table with 3 fields
    ITAB1
    1   a
    2   b
    3   c
    I want to print this in the gird like
    1   2   3
    a   b   c
    Can any one help me how to do it
    Thank you

    DATA: BEGIN OF S_STRUC,
    KEY1,
    KEY2,
    KEY3,
    KEY4,
    FIRST TYPE CHAR10 VALUE 'FIRST',
    SECOND TYPE CHAR10 VALUE 'SECOND',
    THRIRD TYPE CHAR10 VALUE 'THIRD',
    END OF S_STRUC.
    DATA: ITAB LIKE S_STRUC OCCURS 0 WITH HEADER LINE.
    DATA: V_INT TYPE INT4.
    FIELD-SYMBOLS: <FS>, <FS1>.
    DO 3 TIMES.
    V_INT = SY-INDEX + 4.
    ITAB-KEY1 = 'A'.
    ITAB-KEY2 = 'B'.
    ITAB-KEY3 = 'C'.
    ITAB-KEY4 = 'D'.
    ASSIGN COMPONENT V_INT OF STRUCTURE S_STRUC TO <FS>.
    ASSIGN COMPONENT V_INT OF STRUCTURE ITAB TO <FS1>.
    <FS1> = <FS>.
    APPEND ITAB.
    ENDDO.
    LOOP AT ITAB.
    WRITE: / ITAB.
    ENDLOOP.
    Regards
    vasu

  • How to pass the internal table defined in program to ALV

    Hi Friends,
    I have a doubt regaring the ALV's,
    How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
    I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
    and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
    Plaese help in resolving this problem....
    Regards
    Pradeep Goli

    Hi,
    Check this thread which gives example of ALV. This will give you an idea.
    Interactive ALV
    ashish

Maybe you are looking for

  • Text messages and Calls failing

    I recently bought a 4s and upgraded to the new iOS. Starting last week my text messages and outgoing callas are failing, but I have a strong signal. I've talked to att, who have checked my phone, the coverage in my area, and replaced my sim card. I'm

  • Acrobat Pro X stamps, comments do not display at certain zoom level

    A user found a bug in Adobe Pro 10.1.6. We have both Adobe Reader and Pro installed on Server 2008. A document stamped with dynamic signature: "APPROVED" do not show in Adobe Pro when opening. If the zoom level is being change then the stamp do show.

  • Front Row Video Distortion

    I have a new iMac intel 20" screen, and I downloaded some TV shows from iTunes and they are very distorted - the sound is fine, but the picture is not good quality. I have downloaded the latest Front Row update (1.2.2), but it really did not help. Is

  • ClassCastException really means "not Serializable" in Weblogic

    I'm writing this more as a public service announcement than anything else. We spent a whole day trying to diagnose a strange ClassCastException in Weblogic 8.1 SP2. Basically, a local EJB 2.0 call was working fine for our test page, but the remote ca

  • Adding Dynamically adding a component to a JPanel and make it diaplay

    Hi, I am having two panels in a container, one is in the left side and the another is in the right side.The left side panel contains some buttons.If the user clicks on any buttons the corresponding component is to be loaded to the right side panel an