How to reduce the code while passing.

hi,
I am passing the below statemnt to pass the field name and description to the sub_fieldcat.
since the report has got 100 fields i need to write for all the 100 fields like this, is there any possiblity to pass the field name and the description with less coding
PERFORM SUB_FIELDCAT USING '' 'BUDAT' 'Posting Date' G_COL 'X'.
ADD 1 TO G_COL.
FORM SUB_FIELDCAT USING L_TABNAME TYPE SLIS_TABNAME
                        L_FNAME TYPE SLIS_FIELDNAME
                        L_SEL TYPE DD03P-SCRTEXT_L
                        L_COL TYPE I
                        L_KEY TYPE C.
  I_FIELDCATTAB_WA-REF_TABNAME = L_TABNAME.
  I_FIELDCATTAB_WA-FIELDNAME   = L_FNAME.
  I_FIELDCATTAB_WA-SELTEXT_L   = L_SEL.
  I_FIELDCATTAB_WA-COL_POS     = L_COL.
  I_FIELDCATTAB_WA-KEY         = L_KEY.
  APPEND I_FIELDCATTAB_WA TO I_FIELDCATTAB.
ENDFORM.             " SUB_FIELDCAT

Hi Anitha,
1. To the FM
   we just need to pass the
   internal table Name
( There is no need to use the parameter
I_STRUCTURE_NAME )
I_INTERNAL_TABNAME Is very important.
2. While declaring the internal table,
   u can use any number of fields.
   But make sure they are
   declare using LIKE
  eg.
   bukrs like t001-bukrs
  (do not use type)
3. Rest the FM will take care !
PS:
Important parameters are:
i_program_name,
i_internal_tabname     = 'ITAB'
i_inclname             = prg
where prg is sy-repid
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = prg
      i_internal_tabname     = 'ITAB'
      i_inclname             = prg
    CHANGING
      ct_fieldcat            = alvfc
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
regards,
amit m.
Message was edited by: Amit Mittal
Message was edited by: Amit Mittal

Similar Messages

  • How to reduce the level of free text / direct purchasing

    A common problem at all sites is how to reduce the level of free text / direct / non catalogue based purchasing. This is where users enter an account assignment and free text instead of using an existing material number.
    This is often the case because it is too "dificult" for the user to search and find the correct material number.
    How have other sites handled this?
    has anyone found a solution that if a user enters lets say "paper" into the free text box, a pop up appears with a match on possible materials with the word "paper" in the short description? This sounds like a pretty easy function to implement? Does anyone have the code?
    Cheerio

    >
    Ravi.or.raj wrote:
    > The search function you ask for is pretty much a standard functionality.
    > In ME21N , click on  "Personal Settings"    , and select the check box "int search help on"  .
    Yes this works, but you have to tell that the user has to enter the text  in the material number field, then SAP will search thru the database.

  • Web report for opening it takes long time how to reduce the time?

    HI Experts,
    I created report using webi. For next time while opening it takes more time. How to reduce the time.

    Hi Manikandan,
    There could be multiple reason behind the bad performance.
    1. Are you using supported JVM version to run Webi reports?
    2. Do the reports contain prompts? Are the LOVs set to "Automatic refresh before use"? If yes, uncheck it.
    3. How many queries do the report has? Can you run the queries one by one and check which query is taking much time?
    4. If it based on relational database, copy and run it against the database directly and check how much time it takes. If more, you may have to fix the issue at database level like using temporary tables, indices, etc.
    5. Also check if there are firewalls or proxy server between client and server communication. if yes, try to refresh the report directly on BO server and check.
    6. Check if there is any hinderance between BO server and Database server communcation.
    Hope it will help.
    Regards,
    Yuvraj

  • How to reduce the barcode size

    hi
    How to reduce the barcode size in smartforms
    Thanks & Regards
    krishna rao

    Hai,
    Go to se73
    select system barcodes radi button
    click change button
    it wil moves to another screen .In that screen it wil show all Bar codes.
    select u r barcode from the list  click and change button.
    in this way u wil change barcode size.
    Reagards.
    kishore ale

  • How to reduce the silence gap of ringtone made by Garageband

    Garageband will add an extra silence (about 0.05 ~ 0.1 second) on the ending. The extra silence is automatically add on while garageband mixdown the track and send to iTunes.
    Maybe Apple just made garageband to be so, just like the ringtone sold by iTunes store, it has at least a 0.5 sec gap. But that makes the ringtone won't be a perfect loop. So, I'd like to know how to reduce the extra silence that I don't want if there's a solution for this.

    you're right, it appears the behavior of the Cycle function has changed, it is very small, but it's enough to mess up looping.
    you could cut off the excess with an audio editor:
    http://www.bulletsandbones.com/GB/GBFAQ.html#audioeditors
    but being one of the few cellphoneless people in the world, I couldn't tell you how to get the edited file into the phone. perhaps someone in the iPhone forum can give you a tip for getting that final part done?

  • How to reduce the posted depreciation

    hi,
    i need to reduce the depreciation for the fiscal year 2007-08. Assume that Depreciation amount was posted as Rs.12000.00 in the last fiscal year . Now i want to reduce only Rs.2000.00 in the same year. i.e 31.03.2008. how to reduce the depreciation?
    Actaully if i need to increase depreciation, we are using unplanned depreciation option. like the way i want to reduce the depreciation.
    govind.

    HI,
    You can create a new transaction type which will ahve an impact on increasing asset values.
    the t code to creat transaction type is AO78 and account assignment to be selected is DEBIT transaction instead of credit transaction.
    regards
    Meena Raghu

  • How to modify the code???

    Hello forum,
    I have code for retriving data from database.
    I want to retrieve more than one row but the code only retrive the
    last row. How to mdify the code??? SorryI am new in Servlet and JDBC.
    Here is the codeimport java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class TiketServlet extends HttpServlet {
         static final String dbURL ="jdbc:mysql://localhost:3306/tiketdb?" + "user=firman&password=ajolie";
         StringBuffer fullName = new StringBuffer();
         public void doPost(HttpServletRequest request, HttpServletResponse response)
              throws IOException, ServletException {
         Connection conn = null;
         String nextJSP = null;
         try {
              Class.forName("com.mysql.jdbc.Driver");
         catch (ClassNotFoundException e) {
              throw new ServletException("Unable to load JDBC driver");
         try {
         String keretaID = (String)request.getParameter("keretaID");
         String kelas = (String)request.getParameter("kelas");
              conn = DriverManager.getConnection(dbURL);
              Statement stmt1 = conn.createStatement();
              String query1 = "SELECT gerbong, kursi FROM "+keretaID+" WHERE kelas ='"+kelas+"';";
              ResultSet rs1 = stmt1.executeQuery(query1);
              while (rs1.next()) {
                   StringBuffer fullName = new StringBuffer();
                   fullName.append(rs1.getString(1));
                   fullName.append(" ");
                   fullName.append(rs1.getString(2));
                   fullName.append('\n');
                   request.setAttribute ("fullName", fullName.toString());
                   nextJSP = "/LoginOK.jsp";
              conn.close();
              ServletConfig config = getServletConfig();
              ServletContext context = config.getServletContext();
              RequestDispatcher rd = context.getRequestDispatcher(nextJSP);
              rd.forward(request, response);
         catch (SQLException e) {
              throw new ServletException(e.getMessage());
         finally {
              if (conn != null) {
                   try {
                        conn.close();
                   catch (SQLException e) {
                        throw new ServletException("connection close failed");
         public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws IOException, ServletException {
                   doPost(request, response);
    Many thanks

    u've to define the stringBuffer before while loop.. thats it u get it correctly..
    b'cos u r defining the stringBuffer inside.. each time when it is entering the loop the the existing stringBuffer is replacing by the new empty stringBuffer...
    --veeru                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to reduce the query execution time

    hai all,
    We have created query on Purchasing Cube 0PUR_C01 for
                                Purchase Order (PO) analysis for single vendor materials, but it is taking long time to execute (about 45 sec...).
    In the above Query we have used the following things:
    In Columns:
    i) Exceptional aggregation for maximum & minimum PO Net Price using reference characteristic as Calendar Day.
    ii) Minimum PO Price value we have multiplied with Actual GR Quantity for the calculation of Impact of Lowest PO Net Price.
    iii) Number of vendors calculated key figure.
    In Rows:i)     Only Material
    In Filters:
    i)     Plant with variable select Option u2013 Optional.
    ii)     Calendar Year / Month with Select Option u2013 Optional.
    iii)     Material with excluded Unassigned (#).
    iv)     Vendor with excluded Unassigned (#).
    Following are we have used for Performance:
    i)     Aggregates using Propose from query (only for this query).
    ii)     Partitioning on Calendar Year / Month (For 1 year 14 partitions) i.e. (04.2007 to 03.2008).
    iii)      Collapse.
    iv)     In RSRT we have set the following properties
    Read Mode = H
    Req.Status  = 0
    Catch Mode = 4
    Persistence Mode = 3 (BLOB)
    Optimization mode = 0.
    Our inputs to this Query:
    i)     We are passing plant range 1201 to 1299.
    ii)     Calendar Year / Month 04.2007 to 03.2008.
    So please suggest me how to reduce the execution time.
    please help me.
    Thanks,
    kiran manyam

    Hi,
    First of all its a complete question with all the details. Good work.
    As you partitioned the cube based on calmonth and you are also giving calmonth in selection, it will definitely work towards improved query performance.
    As you are putting plant values in the selection, is there any aggregate available on plant characteristics? If not creating a aggregate on plant will help.
    Regards,
    Yogesh

  • How to reduce the size of the pdf scanned file ?

    Hi, 
    I have canon PIXMA MG2120. I am trying to scan the documents but the size is to big to attach to email. Any Idea how to reduce the size of the PDF file?

    Hello
     For pdf size,you can compress the pdf size if you want to reduce the size of the pdf files.
    Here is the code to do it:
    using System.IO;
    using System.Drawing.Printing;
    using RasterEdge.Imaging;
    using RasterEdge.Imaging.Codec.Compression;
    using RasterEdge.Imaging.PDF;
    DocumentCompression.infile(@"C:\1.pdf");
    DocumentCompression.Outfile(@"C:\2.pdf");
    DocumentEncoder = DocumentEncoder.Group3Encoding
    RasterEdgeImaging Document = new RasterEdgeDocumentg();
    Image. DocumentCompression(@"C:\1.pdf", "C:\2.pdf", DocumentEncoder DocumentEncoder.Group3Encoding);

  • How to reduce the size of the pdf file?

    How to reduce the size of the pdf file?
    Thank you for the help,
    Best
    Jamal

    You have two options:http://www.screencast.com/t/p3srGDGP
    In this screen shot I have two method chosen.
    the one highlighted in yellow is more effective, except in the case where the pdf was from a Scan which is graphics only.
    select the one in yellow first and click on Fonts. Remove all duplicates. for some reason, I don't know if its defect in Acrobat, but usually multiple copies of the exact Font will show up and some cases there will font families not even used in your document.  remove all duplicates.
    Note: Duplicates do not mean for example: Helvetica, Helevetica Bold, Helvetica Bold Italic (these are three different fonts).
    You can reduce the quality of the graphics used and so on while in menu.
    The feature highlighted in green  more or less just reduce the general qaulity of the PDF. and may work for some PDF's

  • How to reduce the size of the search portlet

    How to reduce the size of the search portlet inserted into a
    page?
    Thanks,
    Mara

    Mara,
    you can reduce the size of the portlet customizing the HTML
    code... i had the same problem and i reproduced the search
    portlet with a dynamic page, customizing my HTML and using the
    categ. & perspective IDs of the original portlet. It works but
    is not an elegant way to do this... i'm searching a better way
    to do it. If you'll find, please let me know....
    Fab

  • How to see the object while moving on the artboard?

    hello everyone;
    maybe a silly question; how to see the object while moving on the artboard? i dont wanna see only the objects bounding box(outline of the object). i wanna see the object it self. thank you.

    What have they gone and messed up now?
    When I drag an object (with bounding boxes turned on), the object moves and the bounding box stays still until I stop dragging, upon which it snaps to the object’s new position.
    If I don’t have bounding boxes turned on (as I usually work), the object moves when dragged.
    If what Bedri says is right, they’ve gone and mended something that wasn’t busted.

  • How to reduce the  width of  OVS view layout

    Hi All,
           In   ESS-Bank Information-Bank Payee  field we have a  OVS View UI .Can any one please let me know how to reduce the  width of OVI  view layout (Search Screen)
    Regards
    Alex

    Check this [thread|restrict input field size;
    Hope this helps.

  • How to reduce the size of a pdf?

    How to reduce the size of a pdf?

    Not do-able with Reader. Acrobat Pro can reduce PDF file size, but... if it's text only (no media or images) it won't reduce any more than it already is.

  • How to reduce the coulmns width for Timesheet in ESS ?

    Hi,
    In ESS Timesheet, how to reduce the columns width for professional self service?
    It is looking fine for weekdays, but when the user is assigned as professional self service at back end, few more sales order columns are added dynamically to timesheet for professional self service user. Now these extra coulmns are jumbled and also wide.
    I tried the OSS notes 989453 in 'listviewerslim.java' , but it doesn't work. Is there any other alternative work around for this. Do I need to work at backend to solve this, If so, please let me know the work around.
    Points will be awarded.
    Regards,
    Raj.

    Dear Friend
    Really need ur help as we are upgrading from 4.7 to ECC6.
    Our client want to implement tiem sheet. Request you to provide gudiance wheher CATS i.e CATSRegular orESS timesheet would be useful.
    if would be great if u could provide a kind of advantages adn disadvantages of both.
    Suitable points would be rewarded
    Sam

Maybe you are looking for

  • App+IIS server role, WCF data problems with Shrepoint Foundation 2013 install on 2012 R2

    Hi I am having tremendous trouble installing Sharepoint Foundation on a Windows 2012 R2 domain controller. The server has just been added to our domain, promoted and this is the first piece of software I am trying to install. I had run Windows Update

  • Dual 7916's showing blank blue screen after 30 mins. uptime

    Have any of you had this experience before? I have a 7975 series phone with dual 7916's expansion modules; The phone and the expansion modules boot-up fine but after 30 mins or more of idle time, the expansion modules display screen is Blue with no p

  • Charge Account on PO Distribution

    Hello Why do we use charge account on PO distribution. As per my understanding, Charge account will not go to GL and there is no associated credit account. Regards Dharam

  • Saving files "as" in Safari

    Hi, How can I download files in Safari in a way that I can choose a filename before saving them to my Mac? As far as I know I can only choose where I want to save a file, but there is no way to rename the file before saving it. Any ideas?

  • Audio won't play on specific videos.

    I work on Amazon's Mechanical Turk. I transcribe the audio for videos for a requester called Crowdsurf. I have never had any problem with any of the videos/audio for any of the tasks, but since purchasing my new laptop I have not been able to get the