Increase length of output field in ABAP Query

Hello All,
I have one ABAP Query in which inside the  system  generated program for the Query, there is a write statement -
write 030(020) anlav-invnr
Because of this statement,  the field invnr is displaying in only 20 chars & the last two chars of the field invnr are not getting displayed.
I want to display all 22 chars for field invnr.
How can I increase the output length for this field.
Please help.
<vague subject corrected by moderator, please choose a meaningful one next time>
Edited by: Thomas Zloch on Mar 3, 2010 2:34 PM

>
Jain Arpita wrote:
> write 030(020) anlav-invnr
Means displaying INVNR field at 030th position with 20 chars width. To increase the width you just give 022 instead of 020 like below.
write 030(022) anlav-invnr
Thanks
Venkat.O
Edited by: Venkat.O on Mar 3, 2010 11:28 AM

Similar Messages

  • Including MANDT field in ABAP Query Report as output field

    Hi All,
    I need to display the client(MANDT) field in the ABAP Query Report as an output field.
    But in SQ01 where we select the fields to be displayed as output in query , this field is not visible.
    I later checked in the Infoset. Even in the infoset the field MANDT is greyed out and all other fields are active.
    Can someone tell me how to include the field MANDT in the output of the ABAP Query Report.

    self resolved

  • Creation of local field in ABAP Query

    Hi
    Please let me know how to create a local field in ABAP query. I am finding the option inactive in SQ01.
    Regards
    Priyadarshini

    hi priya,
         *__Adding u201CLocal Fieldu201D (user defined field) in SAP Query_ :
    There is also facility to add the user defined fields in SAP query output. Also we can provide calculation formula for calculating values for this user defined field.
    Calculation formula consists of standard fields from standard SAP tables. So the values fetched for particular standard SAP fields from standard SAP tables get calculated as per the calculation formula defined for the user defined field and displays the value accordingly.
    To do this first go to change mode for Query which automatically takes you to screen shown below and click on icon   , as below :
    Then further screen will appears. So select the Field group and again click on the same icon button   .
    Then switch on the Short names for the fields and give the short names to fields which we need to use in Calculation formula.
    Give the short names and then created u201CLocal Fieldu201D, as shown in below screen shot. Also Short names are given to fields, which can be used further for calculation.
    Defining Local Field u201CREM_QTYu201D along with its field type and Calculation formula.
      In this case we have 
      defined field type for new  
      field as similar to
      ORD_QTY and
      Calculation formula is  
      defined.
    Also its possible to have Conditional logic for Local field by putting Condition in u201CConditionu201D line.
    Now activate this newly added Local field for coming it in output screen. To do the same again go to u201CBasic Listu201D and activate the Local Field as shown below :
    i think this will help u
    regards,
    sindhu.

  • Addition of checkbox and 2 fields in ABap query selection screen

    Hi
    I need to add chack boxes and 2 fields in ABAP query which is using LDB QMI. can u pls let me know how to do that.

    Hi Tarun,
    I am still not clear with the problem..I guess you require plant in your selection screen which you have.
    i guess if you go to sq01tcode there is a option infoset query from where you can give your selection options and value.
    have you selected all the fields in infoset and made a selection screen?
    When you have done with your infoset you just need to diplay the fields and there is a automatic program generated.
    Let me know...
    Regards,
    Nihkil.

  • FB03 - Increase length of the field "Account Short Text" in FB03

    Dear Expert!
    I understand that Tcode: FB03 is SAP standard tcode. However, i just want to ask, is it possible to increase length of the field "Account Short Text" to 42 characters in FB03? Because my vendor/customer name is quite long, and when i view via FB03, the field "Account Short Text" only displays 20 characters, not full vendor/customer name. Unless, i double click on the line item, then i can see full vendor/customer name. But i want the "Account Short Text" field can display full vendor/customer name.
    Is that possible?
    Thank you very much.
    LeLinh

    Hi,
    there's a matadata table behind it RFPSD and for Account short text field KTEXT is used, which in fact has a length of 35 chars.
    But on the other hand there's also a filed KTEXT_GL (G/L Account Short text) which is maybe applied here. It has a length of 20.
    You can do some more checks on program to clear it finally
    Regards

  • Add fields in abap  query

    Hi,
      Please let me know , how to add two fields in ABAP Query.  Please it  showing  two fields in list fileds  but i want to add two into one.
    thanks,
    Sonar

    Thanks  for  Inf
    Here I want  to  print total  of two fields  into  one  field,  where  concatenate  should  be there
    mv_abrmenge, mn_abrmenge  
    select ebelnr, htariftyp, csparte, cvertrag, cvkont, mbelzart, cbegabrpe, cendabrpe, mv_abrmenge, mn_abrmenge, e~budat
    from erchc as e
    join dberchz1 as m
    on ebelnr = mbelnr
    join erch as c
    on mbelnr = cbelnr
    join ever as r
    on cvertrag = rvertrag
    join eanlh as h
    on hanlage = ranlage
    where h~tariftyp in @p1@
    and c~erchc_v = 'X'
    and c~simulation = space
    and c~tobreleasd = space
    and e~budat in @p2@
    and e~simulated = space
    Thanks,
    Sonar

  • How to hide some fields in ABAP Query

    Hi,
    My ABAP Query has a long list of extracted fields. I wanted to set some of these output to "HIDE".
    This allow User the flexibility to decide what fields to show.
    How can I set the field to "HIDE" in my query?
    Thanks
    bye

    Hi Tim,
    You can do this by setting the Report layout variant in following steps:
    1. First define the parameter on selection screent for report variant.
    2. Data decelaration for variant.
    3. Value request to get already present variants on report:
    4. If doesn't choose the layout take out the default report layout.
    5. Initialize the report variant.
    6. Apply the variant to the REUSE_ALV_GRID_DISPLAY funtion module.
             Here to generate report variant first to open report output and then as per according to user set the layout of report using the layout icon of ALV with summation on value fields (as required) and create layout name.
    *Data Deceleration as below:
    Data :g_save(1) TYPE c,
    **      g_default(1) TYPE c,
    g_exit(1) TYPE c,
    gx_variant TYPE disvariant,
    g_variant TYPE disvariant.
    *First Define the parameter to give layout of Report variant.
    SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari TYPE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK 3.
    * Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    PERFORM f4_for_variant.
    * Selection-Screen Checking
    AT SELECTION-SCREEN.
    PERFORM pai_of_selection_screen.
    INITIALIZATION.
    w_repid = sy-repid.
    PERFORM variant_init.
    * Get default variant
    gx_variant = g_variant.
    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
    i_save     = g_save
    CHANGING
    cs_variant = gx_variant
    EXCEPTIONS
    not_found  = 2.
    IF sy-subrc = 0.
    p_vari = gx_variant-variant.
    ENDIF.
    FORM f4_for_variant .
    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
    is_variant = g_variant
    i_save     = g_save
    IMPORTING
    e_exit     = g_exit
    es_variant = gx_variant
    EXCEPTIONS
    not_found  = 2.
    IF sy-subrc = 2.
    MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    **  ELSE.
    **    IF g_exit = space.
    **    ENDIF.
    ENDIF.
    ENDFORM.                    " f4_for_variant
    FORM pai_of_selection_screen .
    IF NOT p_vari IS INITIAL.
    MOVE g_variant TO gx_variant.
    MOVE p_vari TO gx_variant-variant.
    CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
    EXPORTING
    i_save     = g_save
    CHANGING
    cs_variant = gx_variant.
    g_variant = gx_variant.
    ELSE.
    PERFORM variant_init.
    ENDIF.
    ENDFORM.                    " pai_of_selection_screen
    FORM variant_init .
    CLEAR g_variant.
    g_variant-report = w_repid.
    ENDFORM.                    " variant_init
    **While Showing report pass the variant :::
    g_save = 'A'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = w_repid
    i_structure_name   = 'IT_MAIN'
    is_layout          = i_layout
    is_print           = i_print
    it_fieldcat        = i_fieldcat[]
    it_events          = i_events[]
    i_save             = g_save
    is_variant         = g_variant
    TABLES
    t_outtab           = it_main
    EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Many Thanks / Himanshu Gupta

  • Query: How to add new fields in ABAP query?

    Hi All,
    Can any one tell me how to add new fields in the ABAP query output?
    We have to add the new fields using query design or we have
    to add those in the background program(automatically generated behind query) by selecting new fields in the code?

    What kind of report? Usually, you have to add the field in the table declaration and then also in the SQL query. After that, include the field in what kind of report you are using.

  • How can we have  Multiple table outputs in a ABAP Query .

    HI Experts .
    query output in 3 different  abap list s
    My requirement is to have  basic list of 20 fields  and the  summation list of 6 individual fields ( grouping ) and  another table output of 10 fields in a single query and single output .  the second and the 3 rd output fields are from  the basic list only .
    kindly help
    Pols

    The user is asking about  Query with more than one list as output.
    like Multiple list in  a ouput.

  • Problem in Currency field in Abap Query

    hi.
         I have created an additional field for storing the currency type.
         Based on some calculations i want to store the currency type into this additonal field.But the problem is that the currency field is not getting displayed in the report though i am getting the currency type in the additional field when i check it while debugging. Can anyone help me out...

    Vimal,
      Is it ABAP Query problem(SQ01).If yes, then
      In tcode SQ02(Infotype)>press extras button(F5)>In right side you will find 4 tabstrip buttons.Press on Extras--> create variable with same type of currency.
    goto Field group button--> add this field to field groups.
    In record processing event after your calculations assign your value of cuurncy to this new variable.
    In tcode SQ01-->enter query name >F6>F6>F6>select your new varaible
    >Press on basic list button(shift+F4)>left side you will find additional fields Node From there select your new field-->Save come back and execute the query.Now  you will find your variable.
    Don't forget ot reward if useful....

  • How to make fields in field group as text fields in ABAP query

    Hi friends,
    I a have a ABAP query 85 corresponding to infoset A205,
    there is a field group in the infoset A205 and it contains some fields
    but some of the fields are made as text fields ................i want to know how to make these fields in
    the field group as text fields.
    there is a small icon  " T " on the field when it is made as a text field .
    Please help me
    Thanks & Regards

    Hi,
    IF you can specify which Field Catalog then it will be useful for us to provide appropriate answer.
    1. For Customer Master
    IMG> Financial Accounting New> Acs Recev and Acs Payable --> Customer Accounts --> Master Data --> Preperation of creating customer master Data --> Define Account Groups with screen layout (customers)
    In that you can create your own account group, and click Details Screen.
    There will Field Status header within that are listed three main areas
    General data
    Company code data
    Sales data
    When you double click these lines it will take you into "Status Group" Overview. Wherein under "Select Group" are listed fields Address, communiucation.... Double click on one group , you will bet aken into the group field wherein you will find 4 colums with indicators assigned to it. ( Suppress, Req. Entry, Opt Entry, Display) you can choose the required option. "Req. Entry" against the field. Click save after you complete your selections.
    2. Similarly you can do for Material Master in
    IMG --> Logistics General --> Material Master --> Field Selection --> Maintain Field Selection for Data Screens
    But be careful when you do it for material master as it is cuts across all the modules...
    Regards
    Sathya

  • Search help for field in ABAP Query

    Hi Experts,
    For a particular field in standard table the search help(F4) is not maintained in the table level, which is used in a ABAP query.
    Is there any possibilities for user-defined Search help using InfoSet or Query?
    Please help me in this regard.
    Thanks in advance,
    Balaganesh.

    Hi Bala,
    I understand your question better now.  Since you mention standard selections I assume that your InfoSet is based on a logical database instead of a table join, direct read, or custom data retrieval program.  You are correct that the AT SELECTION-SCREEN ON VALUE REQUEST logic I mentioned earlier will not work for the standard selections of a logical database.  The system gives you an error when generating your InfoSet if you try to use the standard selection name (in ECC 5.0 at least).  I've tried various tricks to attempt to get it to work, but so far no luck. 
    You could, of course, use a different logical database as your InfoSet basis (e.g. VAV has a matchcode on VBAK-VBELN) or create your own data retrieval program and change your InfoSet to use the custom program instead of a logical database.  In the second case you wouldn't need to deal with standard selections at all.  I understand that these solutions are probably not what you need and, in the case of the custom data retrieval program, would be more complex (it may not be worth it to write a custom program just to allow F4 help... or maybe it would be... just depends). 
    Please keep us updated if you find a way to do it.  I'll also report back if I happen to discover a way.
    Best Regards,
    Jamie

  • How to sort the fields in ABAP query.

    Hi all
    I am not able to drag the fields in Sort tool box.
    Please help me how to add the fields in Sort tool bar.
    Regards
    Gangi

    In SQ01, when we are creating a query, we can define the default sort sequence & Totals also.
    This can be done when defining the basic list.

  • Inserting addition field in ABAP query (SQ01) while generating reports.

    Please let me know the procedure of adding field and applying mathematical  formula in the query.

    Hi,
    have a look at the help <a href="http://help.sap.com/saphelp_erp2005/helpdata/EN/d2/cb4138455611d189710000e8322d00/frameset.htm">Creating and Changing Queries</a>. I doubt that you can add real formulas besides the predefined statistics.
    Regards,
    Christian

  • ABAP QUERY: Selection text name change : seq. of column sequence in output

    hi friends,
    1)I need to change the text of the selection field in ABAP QUERY REPORT
    please help me. t code: SQ03 : User Group(zabc) and report name (zabc).
    Environment -> infosets.
    in the field group, double click field name to be changed. I tried to change it. The changed name is only reflecting in the list output, but not in the selection screen.
    I want the text to be changed even in selection screen.
    2)I want to change the position of the column ie end(last colum) to 8th column in the report output. Please help me.
    Environment -> Queries -. I tried with 'Output sequence' and given no as '8'. But is not reflected and the column is still displayed at last column.
    Please help me

    Go to Query and go to selection field and change the selection text.
    Hope this help.

Maybe you are looking for