Select statement to extract the material description with asterick values

Hi All,
My requirement is to get the list of materials which have description with asterick symbol.
for example : materail1 has description  - Oil 3p * Gas 22'.
This material contains  * in the description .Ineed to get list of materials from Makt with asterick.
I have written like this
s_makt-sign = 'E'.
s_makt-option = 'CP'.
s_makt-low = '%'.
*s_makt-high = ".
append s_makt.
  SELECT matnr maktx FROM makt INTO TABLE t_makt where maktx IN s_makt.
but it is  extarcting all the materials in MAKT.
Can anyone suggest me how to write that?

I'd try something like below....don't try to get too fancy.
select * from makt into it_makt where spras eq sy-langu...
loop at it_makt assigning <fs> . 
If <fs>-MAKTX (or MAKTG) cs lc_asterisk.  "constant described as char1 with value '*'.
else.
delete it_makt.
endif.
endloop.

Similar Messages

  • How to use SELECT statement  to extract KNA1-NAME1 and KNB1-ZSABE

    In building table I_KNA1 in  form f_extract_data, an additional select statement is needed to select and  append datafrom (KNA1 and KNB1) to existing I_KNA1
    In form f_extract_data table i_kna1 is populated with data from zd_kna101.(where ZD_KNA101 is a view of KNA1, KNB1 and KNBK.  It's a joint of these three tables.)  This will take care of all customers with KNBK-BANKL and KNBK-BANLN populated.  But this does not include new customers created in SAP CRM (no KNBK records).  Therefore a separate SELECT statement is needed to extract KNA1-NAME1 and KNB1-ZSABE for customers created in SAP CRM(the customers who do do not have BANKL and BANKN). These selected records are then need to be appended to I_KNA1.  It's possible that new selection statement might extract records that are already in existing I_KNA1 table.  IF this is the case, right after the append, sort I_KNA1 and remove duplicate records.
    form f_extract_data.
    select kunnr                         " Customer Number
             name1                         " Name
             zsabe                         " Business Unit
             bankl                         " Legacy Bank Key
             bankn                         " Legacy Bank Account
        from zd_kna101                     " View of KNA1, KNB1, and KNBK
        into table i_kna1
        for all entries in i_doc_by_ref
       where kunnr = i_doc_by_ref-kunnr
        and zsabe in s_zsabe.           
      if sy-subrc <> 0.
        message a116 with 'customer'.  " Customer Table is empty.  HALT!!!
      else.                                                    
        sort i_kna1 by kunnr.                                  
      endif.
    will I have to use the join statement(for KNA1-NAME1 and KNB1-ZSABE using the key as KUNNR) here or give two seperate select statements for extracting data from KNA1 and KNB1 using the key as KUNNR.
    THANKS FOR THE HELP.

    I would suggest using the join on KUNNR.  Maybe something like this.
    data: begin of itab occurs 0,
          kunnr type kna1-kunnr,
          name1 type kna1-name1,
          ZSABE type knb1-ZSABE,
          end of itab.
        select kna1~kunnr kna1~name1 knb1~zsabe
               into table itab
                    from kna1
                       inner join knb1
                            on kna1~kunnr = knb1~kunnr
                                   where ........
    Regards,
    Rich Heilman

  • SAP Script : to display the material description in two lines

    Hi All,
    I'm working on scripts.
    the material description field is been passed from my driver program ..into the script..
    Ex: &gs_final-maktx& ..
    There r a number of other fields to be displayed ...after this field ....
    Is there any option to split the 'Material description into two lines'?
    Ex: at present it is :
    This is material description
    Requirement is:
    This is material
    description
    I mean that there a number of field berfore and after this field......in the same line
    I need to jst split the materia description ...& make it to appear in two lines.....!!
    Expecting your suggestions....
    Edited by: vidya vidya on Nov 11, 2008 3:17 PM
    Edited by: vidya vidya on Nov 11, 2008 3:20 PM

    FM TEXT_SPLIT ?
    ..but i handled this by code.
    DATA:      zzboldsx(18) TYPE c,
          zzboldsx2(18) TYPE c,
          zzboldsx3(18) TYPE c,
          zzboldsx4(18) TYPE c.
    DATA: i_lines TYPE STANDARD TABLE OF tline WITH HEADER LINE ,
            r_lines TYPE tline,
            v_cnt LIKE sy-tabix.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = stxh-tdid
          language                = stxh-tdspras
          name                    = name
          object                  = stxh-tdobject
        TABLES
          lines                   = i_lines[]
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc = 0.
    * Only 4 lines of Header text supported. Can add if needed
        LOOP AT i_lines INTO r_lines.
          CONDENSE r_lines-tdline NO-GAPS.
          v_cnt = v_cnt + 1.
          CASE v_cnt.
            WHEN 1.
              zzboldsx = r_lines-tdline.
            WHEN 2.
              zzboldsx2 = r_lines-tdline.
            WHEN 3.
              zzboldsx3 = r_lines-tdline.
            WHEN 4.
              zzboldsx4 = r_lines-tdline.
            WHEN OTHERS.
              EXIT.
          ENDCASE.
    *   zzbolDSX =  i_lines-tdline .
        ENDLOOP.

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • How could i get the material description in cost esti itemization view?

    Hi Gurus,
    I have created the process order (T.Code COR1) and calculate the cost & get the material costing details.but i required to see the material description (Packaging material) rather than the material code (PK01-1204) in costing itemization view.
    E.g.
    SAP Material Code: PK01-1204 - Description - Packaging material.
    while checking the costing view  i had see the Material code PK01-1204 in itemization.but i required the material description (Packaging material) in itemization view.
    Please help me to overcome this issue......
    Regards,
    Dhananjay R.

    Dear Dhananjay,
    You can have Material description in Itemization by following way :
    Go to Itemization screen -
    > Change layout ( On top you will find icon for this , below Display Itemization text)
    In change layout you will see Filter icon ---> select Plant / Material Text by dropdown in it and save it so you will find material description in itemization.
    Try above which will resolve your issue.
    Revert in case any problem.
    HOpe this helps.
    Regards,
    Tejas

  • Select statement to capture the vender address in SMARTFORM ?

    Hi All,
    I need help,i want to Capture the address and have to keep that address in vender address window of the smartform,
    For this I want to show the field form LFA1 that are NAME1,STRAS,ORT01,ORT02,PSTLZ,REGIO.
    I already kept address text for that but it is not collecting full Address and is collecing one field extra like "Republic Of India".
    Please any body send me the Coad for THIS .....
    Advence Thnks.

    Types: begin of TY_LFA1,
         NAME1 type LFA1-NAME1,
    STRAS type LFA1- STRAS,
    ORT01 type LFA1- ORT01,
    ORT02 type LFA1-,
    PSTLZ type LFA1- PSTLZ,
    REGIO type LFA1- REGIO,
         End of TY_LFA1.
    Data: WA_LFA1 type TY_LFA1.
    Parameter: lifnr TYPE lifnr.
    Select NAME1 STRAS ORT01 ORT02 PSTLZ REGIO
    into corresponding fields of WA_LFA1
    from LFA1
    Where Lifnr = Lifnr.
    If you are already getting Lifnr from some where remove the parameter statement and replace the where condition with the corresponding WA holding the lifnr value.
    Now while calling your Smart Function Module.
    add the WA in the Exporting part.
    Eg:
    CALL FUNCTION FM_NAME
    EXPORTING
    wa_lifnr = wa_lifnr.
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.IF SY-SUBRC <> 0.
    Now you will be able to use the Vendor data on the smart form

  • To fill in the material number with item category u201CBu201D for Framework Order.

    The use of framework orders (also referred to as blanket purchase orders)  enables you to procure a variety of materials or services from a vendor up to a predefined maximum value (the value limit).
    Instead of a specific delivery date, you specify a validity period for the order.
    Goods receipts or the entry and acceptance of services performed are not necessary in the case of a framework PO and limit items.
    The invoices are posted directly with reference to the purchase order, provided that the specified value limit is not exceeded. When the value limit of the PO is reached, or the validity period is exceeded, the system issues a warning message. It is possible to book the invoices, but these are blocked for payment.
    During the phase of service performance, the cumulative u201Cactual" values (for the services actually performed) are continually updated in the underlying purchase. This enables you to monitor the progress of a procurement project on an ongoing basis. By comparing the "actual" value with the total value, you can always obtain an overview of the degree to which a budget for unplanned services or materials has been exhausted (i.e. see whether predefined limits have been reached or nearly reached).
    So with the Framework Order type (FO) and item category u201CBu201D you get the error that it is not allowed to fill in the material number with item category u201CBu201D.
    Please suggest me the possible solution to fill in the material number with item category u201CBu201D for Framework Order.
    Best Regards,
    Harisha

    The Framework order type is specialy defined for lesser value procurements (ex: stationeries, cleaning services ....) which are all not worthy to create Material Master at all.
    If you are very sure to fill the Material number, then proceed with some other document type.
    In what circumstances you want to put material number in FO order?
    Karthi.

  • Which option do I have to select If I buy the latest iPad with cellular feature for international use? If I choose verizon can I just change the sim card and insert one from another country?

    Which option do I have to select If I buy the latest iPad with cellular feature for international use? If I choose verizon can I just change the sim card and insert one from another country?

    I would guess you need the A1460 model
    see here
    http://www.apple.com/ipad/LTE/

  • In PM order, can we change the material description for item category N?

    Hi,
    In Plant Maintenance work order, is there a way to change the material description while purchasing material (item category N) using a material master number? In config. the material description field is open for input. However on the work order components screen it becomes grey as soon as one enters a material master number.
    Background: We want to maintain generic material master records in the system and use them for purchasing materials (item category N) on work orders so that the purchasing data defaults from the material master. But we need to be able to change the description per the specific requirement.
    Similar functionality works on sales orders. Are we missing anything?

    Hi there,
    One solution would be to have some generic materials created and used them during work order processing. These generic materials needs to be extended to all the required plants.
    Hope this works,
    Cheers !!!

  • How to integrate Material Descriptions with Custom Language codes

    I am working on the materials integration - ECC to C4C.
    The material descriptions have additional custom language codes (Z1, Z2, etc) to store additional descriptions.
    1. How can we adjust our integration in C4C to take those additional descriptions ?
    2. Specifically,  can we even create custom language codes Z1, Z2, etc ?
    3. Will the integration (mapping, idocs, webservices) need any adjustment for extra language values to pass along ?
    Thanks ahead,
    TC

    Hi Tim,
    in the integration ECC to C4C only ISO language codes are supported. Furthermore custom language codes cannot be created in C4C. In your case you have to store the additional information in the C4C material master using extension fields.
    Regards,
    Sascha

  • The Material description on sales order for a particular item is red text

    Hi friends,
    When I key-in a sales order for a specific material, the material description on the sales order appears in red text. What could be the reason?
    Sreedhar

    Hi Sreedhar
    First of all Welcome to SDN forum
    Coming to your query , As the material description maintained in MMR  is coming in red colour in sales order , First of all check in which colour you maintained the text in MMR . Secondly check the MAKT table .
    As you are telling for a specific material , check for other materials and their material texts & colour in sales order also
    Regards
    Srinath

  • How to read the 'Input help with fixed values' of domain .

    How to read the 'Input help with fixed values' of domain .
    The domain has a Value range i want to read those values .
    Are these values stored in any table ?
    Plz help me i need it ver badly...
    Thanks in Advance...

    Hi Chandra Shekhar,
    To read the 'Input help with fixed values' of domain , you can use the function module : HR_P_GET_FIXED_VALUE_TEXT.
    iIf you enter the domain name, you will find the fixed values entered in the domain.
    These values are stored in a table DD07L(DD zero 7 L). Here the values are stored based on domain name.
    See if it works for you.
    Award points if its helpful.
    Regards,
    Bhanu

  • Select statement takes very long to run with order by clause.

    Hi all,
    I have a select statement which when I run without the order by clause takes arround 2 minutes to run. But with the order by clause it goes on for ever. I am trying to access the database server through a network which is not too fast.
    The select statement is based on 9 views which are again based on some views. It also has inline views and outer joins. These views and inline views can not be done away with.
    When selected without the order by clause it gives 3215 records.
    Anything like 2 to 3 minutes will be Ok.
    Thanks.
    --Malay                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    The select statement is as follows :-
    SELECT f.system_name,
    a.signal_type,
    f.sys_signal_name,
    a.bus_desc,
    b.vl_ident,
    b.vl_name,
    b.src_mac,
    b.src_mac_addr,
    b.dest_mac,
    b.dest_mac_addr,
    b.network,
    bb.bufr_size_in_bytes,
    bb.bag_in_ms,
    bb.is_rma_used,
    bb.is_ic_used,
    bb.sub_vl_cnt,
    bb.skew_max_in_ns,
    cc.msg_name,
    c.src_ip,
    c.src_ip_addr,
    c.src_port,
    c.dest_ip,
    c.dest_ip_addr,
    c.dest_port,
    cc.rate_in_ms,
    cc.tx_mode,
    cc.protocol,
    cc.port_type,
    cc.msg_length_in_bytes,
    d.mnemonic,
    d.start_addr32,
    d.lsb,
    d.end_addr32,
    d.msb,
    d.format,
    d.init_value,
    d.fs_mnemonic,
    d.fs_afdx_data_id,
    d.digital_data_id,
    DECODE(
    d.digital_datatype,
    NULL, '',
    'UNUSED', '',
    api$util.concat_column_data(
    'api_'
    || d.digital_datatype,
    'digital_data_id',
    d.digital_data_id,
    bool.FALSE
    ) AS data_details,
    f.connection_id
    || '_'
    || a.digital_bus_id
    || '_'
    || b.afdx_vl_id
    || '_'
    || bb.afdx_output_id
    || '_'
    || c.afdx_frame_id
    || '_'
    || cc.afdx_msg_id
    || '_'
    || d.afdx_data_id AS KEY
    FROM api_afdx a,
    api_afdx_vl b,
    api_afdx_output bb,
    api_afdx_frame c,
    api_afdx_msg cc,
    api_afdx_data d,
    vf_signal e,
    (SELECT DISTINCT aa.signal_id,
    cc.system_name,
    bb.connection_id,
    bb.sys_signal_name
    FROM vf_nodes aa,
    vf_connections bb,
    vf_system cc
    WHERE aa.connection_id = bb.connection_id
    AND bb.system_id = cc.system_id) f
    WHERE e.signal_id = f.signal_id(+)
    AND e.digital_bus_id = a.digital_bus_id
                   AND a.digital_bus_id = bb.digital_bus_id(+)
    AND bb.afdx_output_id = b.afdx_output_id(+)
                   AND b.afdx_vl_id = c.afdx_vl_id(+)
    AND bb.afdx_output_id = cc.afdx_output_id(+)
    AND cc.afdx_msg_id = d.afdx_msg_id(+)
    ORDER BY f.system_name,
    a.signal_type,
    f.sys_signal_name,
    b.vl_name,
    cc.msg_name,
    d.start_addr32,
    d.lsb;
    Where api_afdx ,
    api_afdx_vl ,
    api_afdx_output ,
    api_afdx_frame ,
    api_afdx_msg ,
    api_afdx_data ,
    vf_signal ,
    vf_nodes ,
    vf_connections ,
    vf_system
    are all views.

  • Need Select statement for fetch the details

    Hi
      i want to fetch particular customer wise sales orderds and that sales order No  and  date of sales order was created..  and  that sales order related PO No  and Materials ..
    for this..   how can i write an executable programm.. is it needed to  define seperate  internal tables or single internal table is enough  ?
    what is the select statement for fetching  all these details..
    any help will be appriciated
    Thanks
    Bbau

    custmer master table is KNA1  knb1  knbk
    sales data tables r  VBAK VBAP VBEP
    Material data  MARA, MARAC, MARD
    PO RELATED ekko  ekpo  eket
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:04 PM

  • Can the dynamic product proposal returned to a sales order be sorted by the material description?

    I have created a dynamic product proposal using the customer material information record CMIR as the source. During sales order entry the product proposal sorts by material number and due to the number of materials in the CMIR the business would like to be able to sort by material description to streamline material selection. Is this possible? Is it possible to sort any of the product proposal types for a sales order by anything other than the product (material) code?
    Any help is appreciated.
    Regards,

    Hi,
    Please check if the material you are trying to invoice has the cost estimate released properly and which is updated in the material master as the planned price.
    Good Luck!!!!!
    Thanks and Regards,
    Bhuvaneswari.S

Maybe you are looking for

  • Business Service and Business scenario

    Hi, Does Business Service and Business scenario are alike ? Rgds,sofia

  • Where the XML file is generated

    Hi, Im trying to upgrade our R3 4/7 to ERP6 ehp4. We have solution_manager Ehp1 witch is intalled. My Instance is known in the solution manager ( SMSY ) I have lauch a maintenance task ( i have select the coponant ) but i haven't see nowhere this XML

  • Ftp plugin problem

    Formerly working Lightroom 5 ftp plugin now returns the following error message: Unable to export. Cannot upload because Lightroom could not create the destination directory. Using a standalone ftp client with the same settings works fine. Any help a

  • Connector from GRC 5.3 to IDM failed

    Hi, In our landscape, we had a requirement to connect GRC 5.3 (RAR) and our IDM UI (NW 7.0 EHP1). The connector type is defined as 'Web Service' connector. But the connection fails with the following error WARNING: Cannot get data extractor forD2H. 

  • Zen Touch Start-up Scr

    I was looking at the settings in The Media Source Software and there is an option to change the start-up screen to a .bmp file. I made one using the correct amount of pixels and saved it as a monochrome bitmap but it won't work. Could Somebody please