How to control field length in SAP query's report output

HI everybody,
I have one scenario in SAP query in which there are two fields in the report output:
Milestone descrition and milestone description Long Text.
In CJ02 (WBS element overview), these two fields are populated with some text.
If description is exactly same as LOng text, long text is NOT getting displayed in output.
If long text is having more characters than description then only long text gets displayed in the output.
Do we need to change infoset or query settings? I haven't handled SAP query programming before.
PLease give some suggestions how to achieve this or I have to write custom report.
Any inputs on this will be highly appreciated.
Regards
Kaushal

Hi,
Refer to this link..Additional field in SAP Query
[Creating Additional Fields |http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]
[Code|http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]

Similar Messages

  • Change the description of a field in a SAP QUERY

    Can i change the description of a field in a SAP QUERY report in the output of the report.or only the standard descriptions can be displayed.
    Edited by: mysap query on May 12, 2009 7:23 AM

    HI,
    in query maintenance (sq01) you can change the text of the field at the selection screen (change the selection text in the screen where you choose the selection fields) and the header text in the output list (basiclist maintennace , go to "basic list header", double-click each header field to maintain the text). This change is only for the particular query. No ABAP-er required to do so.
    BR Christian

  • How to increase field length?

    How to increase field length?
    path -> in T Code MM01 -> Additional Data ->Unit of mesure (tech name UMREZ)
    default length is 5 digits i want increase 7 digits................

    HI,
    I don't thing it is at all possible. Because your field is a standard one and the 3 available exits in MM01
    MGA00001            Material Master (Industry): Checks and Enhancements
    MGA00002            Material Master (Industry): Number Assignment
    MGA00003            Material Master (Industry and Retail): Number Display
    can not help it.
    Regards,
    Anirban

  • How to Control Barcode style in SAP with New Procedure

    Dear Friend,
    I am format my data to print out as bar codes that use in New Bar Code Printing!
    But the Bar Code only include series of lines of varying thickness and/or distance from one another , without information which stand for character .
    How to do that  display Bar Code include lines and information which stand for character ?
    How to Control Barcode style in SAP with New Procedure ?
    Thanks a lot !

    the barcode is print the type of barcode . check below barcodes
    KUNAUNR
    KUNAUPS
    AUFNR
    these barcodes print like this
    testbarcode

  • How to add a parameter to sql query in report

    Hi
    How to add a parameter to sql query in report.
    Parameter is from Visual studio
    example:
    select * from tab1 where dl=parameter???
    I have VS 2008 prof CR XI R2, mysql

    Hello,
    If you have this API available then you can modify the record selection formulae in code to add filtering:
              string recordSelectionFormula = "{T_INV_RPT_ADDR.IND_PROMUS} = {?P_PROMUS?} AND {T_INV_RPT_POINT.INVOICE_DATE} = DATE(2008, 05, 31) AND {T_INV_RPT_POINT.CHECKOUT_DATE} = date(2008, 04,29)";
                CrystalDecisions.CrystalReports.Engine.ReportDocument.RecordSelectionFormula = recordSelectionFormula;
    You have to format and follow the rules as in the Designer so not too much work to get this to work.
    CR for .NET may not have the ability so you will need to upgrade to a Developer version of Crystal Reports.
    Thank you
    Don

  • Converting SAP Query to Report Program

    Hello Experts,
    I'm stuck up with an issue.
    I want to convert SAP query into a report program as the things which I need to implement is not possible with SAP Query anymore.
    So I need to convert SAP query to Report program.
    I'm very much aware about the SQ01--> Query --> More functions --> Display Report Program
    But this Report Program generates is AQ..................... but if you see the code there will be buch of dynamic calls not as clear as ABAP code and not much flexibility to modify...
    Please Provide a solution to this.
    Regards,
    Titiksha

    Hi Bhange,
    Glen Anthony has said very well and I support him. Even I suggest you to ignor the report generated with Query and develop a new report with the required business logic.
    Regards,
    Vijay

  • How to add new codes into SAP Query/Infoset

    Hi Experts,
    First time working with SAP Query.
    I need to enhance an existing Query to add a new field into a report.  I have added new tables into this Infoset and joined my new  tables with existing tables and able to extract the new fields out on the report.  But here are my problems:
    Example of original output:
    X88888 500000
    X99999 400000
    Example of new output after adding my 2 new tables to get 1 new field to output:
    X88888 50000  01/08/2009
    X88888 50000  01/25/2009      <--- for X88888 customer, I want only this record w/ latest date to be output
    X88888 50000  01/22/2009   
    X99999 40000  03/09/2009
    X99999 40000  04/18/2009
    X99999 40000  04/19/2009      < -- for X99999, I want only this record w/ latest date to be output
    Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output.  I looked at the query program and it looks very confusing and hard to understand.
    Please advise,
    Thanks,
    Sam

    Hi Sam,
    Instead on adding new table/tables , better way to use Direct Read from your single table.
    Please read the below steps to suffice your requirement.
    Assumption: Let your original table be A and second table is B.
                            Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
                             You want field date1 of table B.
    Infoset Changes:
    1. Go to SQ02 (Enter Infoset name, click on Change button)
    2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
    3. Select that field in one of the field group of your Infoset.
    4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
    5. In Data Section , declare an internal table like below code (here pseudo code)
    data: begin of itab_date occurs 0,
                       date1  like B-date1,
                       end of itab_date.
    6. In Recod processing Event write the following code.
    CLEAR itab_date.
    CLEAR E_date.
    SELECT date1 FROM B into table itab_date                           " Retrieving date field from table B
    WHERE X = A-X1.
    Sort itab_date by itab_date-date1  DESCENDING.                 "Sort internal table B in decendind order on date1
    READ TABLE itab_date index 1.                                            "Read first record of interanal table
    E_date  = itab_date-date1                                                      "Assigning top most date of internal table into field E_date.
    7. Generate the Infoset
    Query changes
    1.Go To SQ01 (in a new session),
    2.Give your Query name, click on change button, and select that field group in which you have added extra field.
    3.Select extra field.
    4.Go to basic list to select that field in your O/p list.
    5.Click on Test button, and see if you are getting desired result.
    Please let me know if you need further details.
    Regards,
    Dinesh

  • How to display long text in SAP Query ALV layout? It only show 129 char now

    I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
    Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
    thanks very much in addvance.

    Hi,
    ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
    Regards,

  • How to control the length of tax number

    Hi,expert,
    I want to control the length of tax number regarding to some  tax category in 'CONTROL' tabpage of newing organization.
    Could some expert tell me how to customize it?
    In my former opinion,I think this should be customized in SAP  NetWeaver->General settings->Set Countries->Set Country- Specific Checks.
    But after I restrict the length check,test result shows  failure.
    For example, tax number1 of BO(Bolivia) should be 10  characters at most. After the length check is set as '10',the  tax number in BP could still contain more than 10 characters.
    So could anybody tell me where's the problem,am I think  wrong? Or did I miss some other

    Hi,
    Did you check the view V_TFKTAXNUMTYPE in SM30? In this view you can see the FM that consists the tax code for BO.
    If the FM does not work for you, you can copy and do the necessary changes!
    Hope this helps!
    Best regards,
    Caíque Escaler

  • SAP Query-for  Reporting   how to create and use it

    Hi SAP Gurus,
    i need your help. in my project, client is asking to create queries to generate reports, i am not familiar with queries, so would appreciate it if any one can guide me and tell me the procedure for writing and creating queries soon.
    also if you have any study material on steps on How to write and create queries for PP module
    thank you very much

    Hi
    Please refer below document
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Also refer below
    How to Create Infoset Query (SAP Query)
    Steps on how to proceed to create a Query:
    ADHOC QUERY
    A query can be created to extract information from master records  i.e  Infotypes.  For example, by creating a query , the data relating to an employee contained in various Infotypes can be extracted.
    Proceedure :  
    Decide on  the various Infotypes we  want to make the query.  Decide on the area where we  want to query  i.e  Global area or Standard area.  Standard area is client specific and globel area will include all clients.
    Menu : HR – PM – Admn -  Information System -  Adhoc Query
    Select area standard and select the  user group already created
    Creation of new query  :  
    TC SQ03  -  Select Environment – Select Standard Area -  Enter  --  If new user group is to be created, enter name of the user group, click on create and enter necessary information and  exit after saving
    TC SQ02  -  Enter name of the Infoset – Create – enter name of Infoset -  Data source -- >  Table join by basis table – give name of table e.g  pa0000 -  Enter -  Click on insert table if we  want to include more tables – give name of table one by one and after finishing,  place cursor on the joining lines and right click to delete unwanted relationships  - check  - and go back  - field groups  -  include all table fields  - click on generate button   -  go out
    TC SQ03  -  Select user group  -   eg.  Payroll
    Infoset  - Enter name of newly created Infoset 
    Assign users and Infosets  -  Assign infosets  -  put tick on payroll  - save and go back
    TC  PAAH  -  Expand the nodes and put tick on relevant fields depending upon necessity
    Save the query  by giving the same name as infoset for easyness..
    For executing a query which is already created
    1. Go to SQ01 transaction
    2. Go to Environment menu->query areas->std areas
    3. Then choose the user group where the query is created
    4. It will display all the queries created for the group.choose the query you want to executeand click execute.
    5. will take to the initial screen
    6. Enter the required parameters and execute
    Regards
    Ranga
    Message was edited by:
            Ranganathan Srinivasamurthy

  • How to write Additional Logic IN SAP Query

    Hi All,
    I need to Add 1 more field in Query.
    How to Write a Logic in Infoset?
    For Ex : Need to add age field in the output.
    Thanks
    Partha.

    Hi,
    Refer to this link..Additional field in SAP Query
    [Creating Additional Fields |http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]
    [Code|http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]

  • How to add field length constraints when using an existing JavaBean model

    Within our current project we used a O/R mapping tool to generate our JavaBean model. For e.g.
    <b>public class Person{
      private String name; ...getName() ...setName(...)
    }</b>
    The whole model is used within our Web Dynpro project. Now it's a requirement to implement field length constraints. Normally this is no problem using ISimpleType like the following:
    <b>attributeInfo = wdContext.nodePerson().getNodeInfo().getAttribute
    (IPrivate...IPersonElement.NAME);
    ISimpleTypeModifiable type = attributeInfo.getModifiableSimpleType();
    type.setLength(60);</b>
    But we've got an runtime exception that it is not allowed to modify the models datatype:
    com.sap.tc.webdynpro.progmodel.context.ContextException: AttributeInfo
    <b>(Basics.Person.name): must not modify the datatype of a mapped attribute</b>
        at
    com.sap.tc.webdynpro.progmodel.context.AttributeInfo.getModifiableSimpleType
    (AttributeInfo.java:337)
    The question is how could a workaround look like. Or is there nothing like that and we have to build a dictionary type tier upon our JavaBean model. Any ideas ?
    thx,
    s.w.

    Sabine,
    You may:
    1. Import JavaBeans model
    2. Create DDIC type with necessary constarints (string-based, max. length 60)
    3. Open editor for target model class and change type of property.
    See my blog /people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model (section "Tweaking model classes") for details.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • How to Hide Empty Column In SAP Query (SQ01)

    I was crated a report in sq01 based on business requirements , but there are some fields without any content , in sq01 if you select one of output fields in the right side of the screen in the left side you can see  "List Fields" T in the list fields there is a check box , the name is "Only display field if <> 0 " , but when i check it, it doesn't work  , guys is there any one to help me to eliminate column without content , in the result of sap query (sq01) ??

    Please give reference (or hyperlink) to 10 Useful Tips on Infoset Queries (original document)
    Regards,
    Raymond

  • How to set field length in Dynamic IT tab

    Hi All,
                 I am creating 1 dynamic internal table with refrence of field catalog, but in the dynamic IT tab and work area i am gettinf field length is 10 char.
    But i want to change this into 15 or 20 char like this....  how can i change this
    Please help me .
    DATA: ep_tab TYPE REF TO data,
          new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE table,
                   <l_line>  TYPE ANY.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          I_STYLE_TABLE   = c_char
          it_fieldcatalog = it_fieldcatalog
          I_LENGTH_IN_BYTE = ' '
        IMPORTING
          ep_table        = ep_tab.
      ASSIGN ep_tab->* TO <l_table>.
      CREATE DATA new_line LIKE LINE OF <l_table>.
      ASSIGN new_line->* TO <l_line>.
    This is my code.
    Regards,
    Arjun.

    Hi,
    try this
    ** ALV DECALRATION
    DATA : wa_lvc_cat TYPE lvc_s_fcat,
           gt_lvc_cat TYPE lvc_t_fcat.
    DATA : wa_fieldcat TYPE slis_fieldcat_alv,
           gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA : wa_slis_layout TYPE slis_layout_alv.
    PERFORM create_dynamic_itab.         " Fill fieldcatlog and create dynamic itab
    *&      Form  CREATE_DYNAMIC_ITAB
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_dynamic_itab .
      CLEAR g_pos .
      PERFORM fill_gt_lvc_cat_fld USING 'MATNR' 18 .  "fieldname outputlen.
      PERFORM fill_gt_fieldcat_field USING c_x 'MATNR'  'CHAR' 18   text-006.
      PERFORM fill_gt_lvc_cat_fld USING 'CODE' 40 .
      PERFORM fill_gt_fieldcat_field USING ' ' 'CODE'  'CHAR' 40  text-024.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gt_lvc_cat
        IMPORTING
          ep_table        = new_table.
    ENDFORM.                    " CREATE_DYNAMIC_ITAB
    *&      Form  FILL_gt_lvc_cat_FLD
    *       text
    *      -->P_0006   text
    *      -->P_18     text
    FORM fill_gt_lvc_cat_fld  USING   p_fieldname TYPE any
                                      p_outputlen TYPE any.
      wa_lvc_cat-fieldname =  p_fieldname .  " 'MATNR'
      wa_lvc_cat-outputlen =  p_outputlen.   " 18
      APPEND wa_lvc_cat TO gt_lvc_cat.
      CLEAR wa_lvc_cat.
    ENDFORM.                    " FILL_gt_lvc_cat_FLD
    *&      Form  FILL_GT_FIELDCAT_FIELD
    *       text
    *      -->P_C_X  text
    *      -->P_0012   text
    *      -->P_0013   text
    *      -->P_18     text
    *      -->P_TEXT_006  text
    FORM fill_gt_fieldcat_field  USING    p_key        TYPE any
                                          p_fieldname  TYPE any
                                          p_datatype   TYPE any
                                          p_outputlen  TYPE any
                                          p_seletext_m TYPE any.
      g_pos = g_pos + 1.
      wa_fieldcat-col_pos    = g_pos.        " 1.
      wa_fieldcat-key        = p_key .       " c_x.
      wa_fieldcat-fieldname  = p_fieldname.  " 'MATNR'.
      wa_fieldcat-datatype   = p_datatype.   " 'CHAR'.
      wa_fieldcat-outputlen  = p_outputlen.                     " 18.
      wa_fieldcat-seltext_m  = p_seletext_m. " text-006.   "'Material'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " FILL_GT_FIELDCAT_FIELD
    PERFORM fill_output_layout.          " Fill the output data into field symbol
    *&      Form  FILL_OUTPUT_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_output_layout .
      ASSIGN new_table->* TO <fs_table>.
      CREATE DATA new_line LIKE LINE OF <fs_table>.
      ASSIGN new_line->* TO <fs_line>.
      LOOP AT  gt_mseg INTO wa_mseg.
          ASSIGN COMPONENT 'MATNR' OF STRUCTURE <fs_line> TO <fs_field>.
          <fs_field> = wa_mseg-matnr.
        READ TABLE  gt_grdtrans INTO wa_grdtrans WITH KEY mawerk = wa_mseg-WERKS
                                                             matnr  = wa_mseg-matnr
                                                             mat_doc = wa_mseg-mblnr binary search.
            IF sy-subrc = 0.
            LOOP AT gt_qmfe INTO wa_qmfe WHERE qmnum = wa_grdtrans-qmnum.
             READ TABLE gt_qpct2 INTO wa_qpct2 WITH KEY  codegruppe   = wa_qmfe-fegrp
                                                         code        = wa_qmfe-fecod
                                                         BINARY SEARCH .
              IF sy-subrc = 0.
              ASSIGN COMPONENT 'CODE' OF STRUCTURE <fs_line> TO <fs_field>.
              <fs_field> = wa_qpct2-kurztext.
             ENDIF.
             endloop.
             clear wa_qmfe.
            ENDIF.
    ENDLOOP.
        CLEAR wa_mseg.
    PERFORM fill_layout.                 " Filling the layout of REUSE_ALV_GRID_DISPALY
    *&      Form  FILL_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_layout .
      wa_slis_layout-zebra             = c_x.
      wa_slis_layout-colwidth_optimize = c_x.
    ENDFORM.                    " FILL_LAYOUT
    Edited by: ShaliniSinha on Mar 30, 2009 1:49 PM
    Edited by: ShaliniSinha on Mar 30, 2009 1:55 PM

  • How to transport deletion of a SAP Query

    Hi
    I have a SAP query which I deleted in the development system through SQ01.    How do I transport this deletion to production ?   Is this possible, or should we be deleting it directly in production system ?
    Many thanks,
    Sanker

    I am interested in this question too.
    The deletion is written to the standard BEx transport. Is it possible to collect the deleted queries and transport the deletion to production somehow?

Maybe you are looking for