Searching for class or method to add mobile components programatically

Hello,
I'm searching for a class and/or a method to add a mobile component and version to a mobile device programatically.
Furthermore I would like to know in which datbase-table I can find
a) The roles and their mobile components
b) The installed components of the registered devices.
I Hope you can help me with this issue.
Best regards.
Lars

Hello,
thanks for your responses. I think the answer of Shobha is very good. I've found a second solution for this problem.
1. Set the MCD-Attributes
DATA: mcd_name TYPE SMMW_MCDNAME,
            mcd_ver    TYPE SMMW_MCDVERSION.
    CLEAR mcd.
             mcd-MCDNAME = mcd_name.
             mcd-VERSION   = mcd_ver.
             APPEND mcd TO mcds.
    CLEAR mcd.
2. Call method
CALL METHOD CL_SMMW_DEV_ADM=>ASSIGN_MCD_TO_DEVICE
    EXPORTING
      RECEIVERID                                 = 'Your receiver-ID'
      MCDS                                           = mcds
      AUTO_FLAG                                = 'X'
    INVOKE_RULE_EVALUATION     = 'X'
    IMPORTING
      NON_AVAIL                                 = NON_AVAIL
      FAILED_MCDS                              = FAILED_MCDS
      MESSAGE_RETURN                     = MESSAGE_RETURN
    EXCEPTIONS
      MCDNAME_VERSION_INCOMPLETE = 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.
With the method of class CL_SMMW_DEV_ADM you can easily add MCDs to your device.
Thank you for your help.
Best regards.
Lars

Similar Messages

  • Searching for class files

    I have been using sysinternals process monitor(procmon.exe) to see what coldfusion/jrun is doing on the system. I see thousands of createFile operations as jrun searches for things like component.class, application.class,  macromedia\jdbc\oracle\OracleURLParser.class, macromedia\jdbc\sqlserver\SQLServerURLParser.class etc. in c:\coldfusion9 directory which it never finds. I would like to know more about what is happening with this. Do I need to change my class path?  Is there an optimal order for class paths?   Does this represent a cache miss?

    Is there any way by which I can iterate through the folders
    and get access to all the class files from the method?The Java Developers Almanac 1.4 has an example of "e33.
    Traversing the Files and Directories Under a Directory" here
    http://javaalmanac.com/egs/java.io/TraverseTree.html
    You "get access to" the class files as you would any other
    sort of fle.

  • Calling method to add JFrame components

    I'm trying to build a GUI. I have a JFrame and want to add components to it from their individual classes to keep everything seperate.
    Can someone give me some guidance with the call?
    Frame.add(method from other class)
    I'm not sure how to do this. I've tried several different options and attempts, but I can't get the syntax right. I can do it from within the JFrame class, but can't figure out the external call. All the examples and tuts I find show calls within the same class, but not from other classes. Right now that's my weak point with this.
    Any guidance...
    Thanks in advance

    public class MyComponent{
        public JButton createLabel(String caption){
             return new JButton(caption);
        public JPanel createPanel(){
            JPanel p = new JPanel();
            p.add(new JScrollPane(new JTextArea()));
            return p;
    public class Demo{
        public Demo(){
            MyCompoent c = new MyComponet();
            JFrame frame = new JFrame();
            // note: if you're using 1.4.2 or older...you have to do
            //  frame.getContentPane().add(component, position);
            // JFrame by default uses a BorderLayout, to change layout..use setLayout() method
            frame.add(c.createPanel(), "Center");
            frame.add(c.createButton("Exit"), "South");
            frame.pack();
            frame.setVisible(true);
    }

  • Bug: JVMTI's NativeMethodBind never called for Class.getSuperclass() method

    This issue is specific to the JRockit JVM only, since it doesnt occur in the HotSpotVM.
    The JRockit JVM version is:
    jrockit-jdk1.6.0_29-R28.2.0-4.1.0
    I am using the JVMTI's NativeMethodBind function to instrument the getSuperClass() method.
    However, it seems all the other native methods of java.lang.Class are indeed passed through the NativeMethodBind event, except for getSuperClass().
    Here is a bit of code:
    void JNICALL
    NativeMethodBind(jvmtiEnv *jvmti_env,
                        JNIEnv* jni_env,
                        jthread thread,
                        jmethodID method,
                        void* address,
                        void** new_address_ptr)
         jvmtiPhase phase;
         jvmtiError status=jvmti_env->GetPhase(&phase);
         if((phase==JVMTI_PHASE_PRIMORDIAL) || (phase== JVMTI_PHASE_ONLOAD))
    //store method info in vectors
              nativeMethodIdVector.push_back(method);
              nativeMethodAddressVector.push_back(address);
              return;
         if(!nativeBound)
              if(!checkedNativeList)
                   checkedNativeList= true;
                   if(doCheckNativeList(jvmti_env))
                        nativeBound = true;
                        return;
              char * name;
              char* sig;
              char* genericP;
              jvmtiError status= jvmti_env->GetMethodName(method,&name,&sig,&genericP);
              const char* a = name;
              printf("%s\n",a);
    bool doCheckNativeList(jvmtiEnv *jvmti_env)
         bool foundSuperClassMethod = false;
         for(std::vector<int>::size_type i = 0; i != nativeMethodIdVector.size(); i++)
              jmethodID currentmethodid= nativeMethodIdVector;
              void* currentmethodAddress= nativeMethodAddressVector[i];
              char * name;
              char* sig;
              char* genericP;
              jvmti_env->GetMethodName(currentmethodid,&name,&sig,&genericP);
              const char* a = name;
              printf("%s\n",a);
         return foundSuperClassMethod;
    The output of this is the following. Note that even though methods like Class.forName0() are included, getSuperclass() is not
    debuggerEvent
    enterExceptionHandler
    generateVirtualCode
    generateFixedCode
    throwPendingType
    registerNatives
    initializeClass
    fillInStackTrace0
    registerNatives
    currentTimeMillis
    nanoTime
    registerNatives
    start0
    stop0
    isAlive
    suspend0
    resume0
    setPriority0
    yield
    sleep
    currentThread
    countStackFrames
    interrupt0
    isInterrupted
    holdsLock
    getThreads
    dumpThreads
    registerNatives
    getName0
    getInterfaces
    getSigners
    setSigners
    getModifiers
    getDeclaredFields0
    getDeclaredMethods0
    getDeclaredConstructors0
    getProtectionDomain0
    setProtectionDomain0
    getDeclaredClasses0
    getDeclaringClass
    getGenericSignature
    getRawAnnotations
    getConstantPool
    desiredAssertionStatus0
    getEnclosingMethod0
    getPrimitiveClass
    getStackAccessControlContext
    getCallerClass
    initProperties
    initialize
    getFileSystem
    initIDs
    initIDs
    registerNatives
    retrieveDirectives
    getPrimitiveHashCode0
    forName0
    intern0
    getFieldOffset
    getBooleanAttributes
    mapLibraryName
    canonicalize0
    registerFinalizer
    load
    initIDs
    initIDs
    set
    initIDs
    allocLargeObjectOrArray
    setIn0
    invokeMethod
    setOut0
    setErr0
    findSignal
    handle0
    setErrorMode
    open
    readBytesPinned
    available
    isJDK15OrBetter
    getNewTla
    initNative
    close0
    list
    canonicalizeWithPrefix0
    getFinalizeeArraySize
    waitForFinalizees
    waitForActivatedQueue
    findLoadedClass0
    isRetransformClassesSupported0
    availableProcessors
    delete0
    VMSupportsCS8
    checkIfThreadOwnsLock
    convertThinLockedToFatLocked
    waitForNotifySignal
    throwException
    clone0
    find
    getVersion0
    initOptionalSupportFields
    getStartupTime
    getVmArguments0
    maxMemory
    getSystemTimeZoneID
    getLength
    getClassContext
    initIDs
    open
    length
    seek
    writeBytesPinned
    initIDs
    initIDs
    initIDs
    initIDs
    read0
    read1
    pread0
    pread1
    readv0
    write0
    write1
    pwrite0
    pwrite1
    writev0
    preClose0
    close0
    force0
    close0
    checkAndTransferLazyLocked
    checkAndTransferLazyLocked
    finalize
    getUTF8At0
    getIntAt0
    defineClass0
    runClinit
    initIDs
    init
    deflateBytes
    defineClass0
    end
    init
    inflateFast
    latestUserDefinedLoader
    end
    park0
    park0
    park0
    park0
    setHasRetransformableTransformers
    getAllLoadedClasses0
    retransformClasses0
    unpark0
    yield
    sleep
    options
    init
    classID
    stackTraceID
    threadID
    rotate
    shutdown
    start
    stop
    onCloneRecording
    onStartRecording
    onStopRecording
    add
    remove
    buffer
    flush
    write
    setEnabled
    setThreshold
    setPeriod
    getPeriod
    descriptors
    addConstPool
    removeConstPool
    storeConstPool
    getSystemPackage0
    defineClass1
    hasStaticInitializer
    d2i
    open
    close0
    Edited by: user11362013 on Jan 11, 2012 4:56 PM
    Edited by: user11362013 on Jan 11, 2012 4:57 PM
    Edited by: user11362013 on Jan 11, 2012 4:58 PM

    Can somebody please look at this. The formatting options in the forum dont seem to support code styles.
    I am willing to provide more samples or a full on reproducible code zip if somebody is willing to take a look at this.
    This issue is really hampering our development.

  • TABLE for Class the methods

    Hi ALL,
    Can anyone tell me the DB table where all the Classs and its methods are stored..?
    Also if one could tell me that for any enhancement class implementation where are the OVERWRITE exit methods stored..
    Regards
    Rajivb Kanoria

    Hi Ill give u the complete steps for what im looking for...
    Go to sfw1(switch transaction).
    enter a switch like  MILL_EHP_01A and execute.
    A new transaction in which we get the package for the switch.
    double click on the package name 'MILL_EHP_01A_SWITCH'.
    traverse to Utilities->display_object list.
    u will go to package builder.
    click on dropdown 'enhancement' on the browser window,
    click on 'Enhancement implementations' dropdown.U will get all the implementations name.
    Double click on any one.
    Now in the Right side u will see a class name on the button in the attributes tab.
    click on the overwrite methods tab.
    U will see the overwrite method dere( I want the tables where these methods are stored).
    Click on the button with the class name.GO TO METHODS TAB.
    u will reach the class builder.
    There is a overwrite-EXIT column.
    In that some methods will have a botton for overwrite exit , some will not.
    Where this info is stored about Overwrite Exits./?
    Regards
    Rajiv Kanoria

  • Sample Javadoc comments for classes or methods using generics?

    Can anyone show me a sample Javadoc comment for a class or a method that uses generics. All my attempts so far ended up in warnings from the Javadoc tool..
    I also looked in the Sun forums, in the Javadoc documentation, but nowhere could I find anything that would help me write correct javadoc comments.
    Any luck for you guys?
    Thanks a lot,
    -Laurent

    Thanks man, sorry it must seem obvious to you, but
    for some reason I couldn't get it to work.No. The first time I also had to ask.
    Now an even more difficult (for me) question: how
    would you refer to that method in a @see or {@link
    ..} javadoc comment?Manually erase the method:
    * The see tag refers to this method
    * @param <T> a type variable
    * @see #foo(Object)
    <T> void foo(T t) {}

  • Parent class loaders are not searched for native libraries?

    I'm loading a native library in the default system classloader. I think create several new children of the default class loader and instantiate some new objects in those child classloaders. The problem is that those new objects get a LinkUnsatisfiedError when they try to call the native methods.
    I was under the impression that ClassLoaders would delegate native method class to their parent class loader, the same way that they do when searching for class definition. This is confirmed by this quote from http://java.sun.com/docs/books/jni/html/design.html:
    "Because each class loader maintains a set of native libraries, the programmer may use a single library to store all the native methods needed by any number of classes as long as those classes have the same defining loader."
    I'm in a serious catch-22 here, because I cannot load the native library in the child classloaders (native libs are not allowed to be loaded by multiple class loaders), and I need to put the objects in a separate classloader. What is the solution?

    i.getClass().getResourceAsStream("/hello.txt"); //this should be disallowedWhy is getting a resource so bad? It puts a dependency on a module, but in a plugin system, dependencies should be supported. Netbeans platform supports this same thing. I use image resources from some core modules at my own risk. If you really want to block it, override the getResource method of URLClassLoader to block unwanted resource fetching. You will have to use the SecurityManager, AccessController, ProtectionDomain, and AccessControlContext and I'm not going to tell you how ;)
    i.getClass().newInstance(); //something even worseNot possible to block without package private constructors or similar restrictions as above.

  • Table name for list of methods for given class

    Hi Experts,
      Is there any table where I can get list of methods in the class?
    Req: Input parameter: Class Name
            Output: List of all methods in it
    Note: As we know, we will have different program names and method names for Classes and Methods. I am okay if I can find table which contains method programs for given class program name.
    Regards,
    Naveen Inuganti

    Hi,
    Check table TMDIR.
    Thanks,
    Venkatesh

  • Runtime Analysis For Classes

    Hi All,
    Can we do runtime analysis for Classes and Methods in the same way as program and function module?
    Thanks & Regards,
    Samir

    You can have a look at this thread Transaction SAT - Analyze Performance of Classes in which the OP has written a blog for the question.

  • Trying to find a class or method for showingStatus in application StatusBar

    hey ever language has a class or method to show the status of the application in the status bar but i have not been able to find one in java uptill now i am still searching for some thing to help is there any one that can help me

    Implementing a status bar is up to you, but it's not
    hard. Use BorderLayout as the layout manager of your
    main window, add JLabel statusJLabel to
    BorderLayout.SOUTH, and call statusJLabel.setText with
    each status message.can you be more specific about the call thingy
    let say i have manu items like
    File > open
    Close
    Save
    Print
    Exit
    now when i bring my mouse on it or go up and down the list the status should show like open, close, save, print, exit.

  • List display for ALV using class and methods

    Hi friends
    I want the list display for the ALV using Class and methods
    which class and methods i can use.
    Here we can't use the REUSE_ALV_LIST_DISPLAY and also GRID
    I was done GRID display using class and methods but i want only list display for using class.
    plz Give me sample code of list display not for grid.
    Thanks
    Nani.

    hi
    please check with this code...
    declare grid and container.
    DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
    o_dockingcontainer TYPE REF TO cl_gui_docking_container,
    i_fieldcat TYPE lvc_t_fcat,"fieldcatalogue
    w_layout TYPE lvc_s_layo."layout
    If any events like double click,etc., are needed we have to add additional functionality.
    call the screen in program.
    Then , create the container as follows
    IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    CREATE OBJECT o_dockingcontainer
    EXPORTING
    ratio = '95'
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6.
    ENDIF.
    CREATE OBJECT o_alvgrid
    EXPORTING
    i_parent = o_dockingcontainer.
    Build the fieldcatalog
    create a output structure in SEll for the ALV output
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = <alv output>
    CHANGING
    ct_fieldcat = i_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE i030."Error in building the field catalogue
    LEAVE LIST-PROCESSING.
    ENDIF.
    *If you need to modify the field catalog,modify it using field sysmbols
    *setting the layout
    w_layout-grid_title = title.
    w_layout-zebra = 'X'.
    then displaying the output
    CALL METHOD o_alvgrid->set_table_for_first_display
    EXPORTING
    i_save = 'A'
    is_layout = w_layout
    CHANGING
    it_outtab = i_output[]
    it_fieldcatalog = i_fieldcat[]
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE i032 ."Error in Displaying
    LEAVE LIST-PROCESSING.
    ENDIF.
    *After that in PAI of the screen, you need to free the *object while going back from the screen(according to *your requirement)
    MODULE user_command_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT' OR 'CANC'.
    PERFORM f9600_free_objects:
    USING o_alvgrid 'ALV' text-e02,
    USING o_dockingcontainer 'DOCKING'
    text-e01.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_9001 INPUT
    *in the program, write the follwoing code
    FORM f9600_free_objects USING pobject
    value(ptype)
    value(ptext).
    DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
    CASE ptype.
    WHEN 'ALV'.
    l_objectalv = pobject.
    IF NOT ( l_objectalv IS INITIAL ).
    CALL METHOD l_objectalv->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, l_objectalv.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN 'DOCKING'.
    DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
    lobjectdock = pobject.
    IF NOT ( lobjectdock IS INITIAL ).
    CALL METHOD lobjectdock->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, lobjectdock.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN 'CONTAINER'.
    DATA: lobjectcontainer TYPE REF TO cl_gui_container.
    lobjectcontainer = pobject.
    IF NOT ( lobjectcontainer IS INITIAL ).
    CALL METHOD lobjectcontainer->free
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    CLEAR: pobject, lobjectcontainer.
    PERFORM f9700_error_handle USING ptext.
    ENDIF.
    WHEN OTHERS.
    sy-subrc = 1.
    PERFORM f9700_error_handle USING
    text-e04.
    ENDCASE.
    ENDFORM. " f9600_free_objects
    FORM f9700_error_handle USING value(ptext).
    IF sy-subrc NE 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
    EXPORTING
    titel = text-e03
    txt2 = sy-subrc
    txt1 = ptext.
    ENDIF.
    endform.
    also check with this
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    Hope this helps
    if it helped, you can acknowledge the same by rewarding
    regards
    dinesh

  • Search for values in class

    Hi all,
    I am fetching data in the following manner,
    1.     Find the deliveries items based on the search criteria
    2.     Pull in the material numbers for each item in the delivery
    3.     Pull in Planned goods movement date LIKP-WADAT
    4.     Exclude materials in the list where MARA-MAGRV = TB01
    5.     Find the External material group value for the remaining list MARA-EXTWG
    6.     Search for values in class ZEHS_DATA
    7.     Pull in value for characteristics
    i.     ZEHS_PLANT
    ii.     ZEHS_RELEVANT
    8.     Eliminate delivery items where ZEHS_RELEVANT = N for next steps, however display what was found
    9.     With EMG for delivery items and ZEHS_RELEVANT = Y pull all fields.
    In which the class ZEHS-DATA is having fields like:
    ZEHS_FORM
    ZEHS_RELEVANT
    ZEHS_PLANT
    COLOR_SUNNBR etc,
    My question is how do I pull values from class ZEHS_DATA??
    Thanks,
    Debrup.

    Hi
    if you have values in a variable declared in CLASS, just call another method of this CLASS with an export paramtere ( export means exporting to the program)
    depending the requirement the method can be PUBLIC or PRIVATE etc
    Regards
    Ramchander Rao.K

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

  • How do I add Smart Contacts to my iPhone? Using these makes searching for a Contact so much easier, but this feature seems only to be available on my Mac

    How do I add my Smart Contacts (on  my Mac), to my iPhone? The Smart Contacts facility makes searching for a Contact so much easier, but this facility does not seem to be available on my iPhone.
    Any suggestions?

    How do I add my Smart Contacts (on  my Mac), to my iPhone? The Smart Contacts facility makes searching for a Contact so much easier, but this facility does not seem to be available on my iPhone.
    Any suggestions?

  • How we can use class and methods for the FM of reuse_alv_list_display

    Hi Abapers,
    Please provide the sample code of class and method of REUSE_ALV_LIST_DISPLAY.
    Which Class i can use for this Function module.
    I need to write a code using OOPS concept.
    I was done the GRID display  using this class cl_gui_alv_grid.
    But i want only List Display using the class & methods.
    Plz provide sample code.
    Thanks
    Nani.

    Hi Nani,
    This is the sample code..
    *&amp; Report Z_OO_ALV
    *& We can Use Two containers in OOALV
    REPORT z_oo_alv LINE-COUNT 50.
    *types gt_struct type sflight.
    DATA BEGIN OF gt_struct.
    INCLUDE STRUCTURE sflight.
    DATA rcol(4) TYPE c.
    DATA colors TYPE lvc_t_scol.
    DATA END OF gt_struct.
    *ALV GRIDs
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
    DATA gr_alvgrid1 TYPE REF TO cl_gui_alv_grid.
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
    DATA gc_custom_control_name1 TYPE scrfname VALUE 'CC_ALV1'.
    *CONTAINERs
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
    DATA gr_ccontainer1 TYPE REF TO cl_gui_custom_container.
    *FIELDCATALOGs
    DATA gt_fieldcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA gt_fieldcat1 TYPE lvc_t_fcat WITH HEADER LINE.
    *LAYOUTs
    DATA gs_layout TYPE lvc_s_layo.
    DATA gs_layout1 TYPE lvc_s_layo.
    DATA pt_exclude TYPE ui_functions. "internal table declaration to be passed.
    *DATA pt_cell TYPE lvc_t_cell with header line.
    DATA : gt_list LIKE gt_struct OCCURS 50 WITH HEADER LINE,
    gt_list1 LIKE gt_struct OCCURS 50 WITH HEADER LINE.
    *DATA v_ucomm TYPE sy-ucomm.
    CALL SCREEN 100.
    *& Module display_alv OUTPUT
    text
    MODULE display_alv OUTPUT.
    PERFORM display_alv.
    ENDMODULE. " display_alv OUTPUT
    *& Module PAI INPUT
    text
    MODULE pai INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT'.
    PERFORM exit_program.
    WHEN 'PICK'.
    PERFORM cell_info.
    ENDCASE.
    ENDMODULE. " PAI INPUT
    *& Form display_alv
    text
    FORM display_alv.
    PERFORM prepare_field_catalog CHANGING gt_fieldcat[].
    PERFORM prepare_layout CHANGING gs_layout.
    PERFORM data_retrival.
    IF gr_alvgrid IS INITIAL.
    CREATE OBJECT gr_ccontainer
    EXPORTING
    container_name = gc_custom_control_name
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    ENDIF.
    CREATE OBJECT gr_alvgrid
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM exclude_tb_functions CHANGING pt_exclude.
    PERFORM set_col.
    CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    it_toolbar_excluding = pt_exclude "excluding toolbar functions
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list[]
    it_fieldcatalog = gt_fieldcat[]
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ELSE.
    CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    EXCEPTIONS
    finished = 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.
    ENDIF.
    PERFORM prepare_field_catalog1 CHANGING gt_fieldcat1[].
    PERFORM prepare_layout1 CHANGING gs_layout1.
    PERFORM data_retrival1.
    IF gr_alvgrid1 IS INITIAL.
    CREATE OBJECT gr_ccontainer1
    EXPORTING
    container_name = gc_custom_control_name1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    ENDIF.
    CREATE OBJECT gr_alvgrid1
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer1
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM set_col1.
    CALL METHOD gr_alvgrid1->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout1
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list1[]
    it_fieldcatalog = gt_fieldcat1[]
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ELSE.
    CALL METHOD gr_alvgrid1->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    EXCEPTIONS
    finished = 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.
    ENDIF.
    ENDFORM. "display_alv
    *& Form prepare_field_catalog
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog CHANGING pgt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'CARRID'.
    ls_fieldcat-scrtext_m = 'Air line code'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = 'X'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'CONNID'.
    ls_fieldcat-scrtext_m = 'Connection code'.
    ls_fieldcat-emphasize = 'C900'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'PRICE'.
    ls_fieldcat-scrtext_m = 'PRICE'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout
    text
    -->GS_LAYOUT text
    FORM prepare_layout CHANGING gs_layout TYPE lvc_s_layo.
    gs_layout-stylefname = 'FIELD_STYLE'.
    gs_layout-zebra = 'X'.
    gs_layout-grid_title = 'FLIGHT'.
    gs_layout-sel_mode = 'A'.
    gs_layout-ctab_fname = 'COLORS'.
    ENDFORM. "prepare_layout
    *& Form data_retrival
    text
    FORM data_retrival.
    SELECT carrid
    connid
    price
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    FORM EXIT_PROGRAM *
    FORM exit_program.
    CALL METHOD gr_ccontainer->free.
    CALL METHOD gr_ccontainer1->free.
    LEAVE TO SCREEN 0.
    ENDFORM. "exit_program
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STAT'.
    SET TITLEBAR 'xxx'.
    IF W_CUSTOM_CONTAINER IS INITIAL.
    **sets TITLEBAR
    PERFORM TITLEBAR.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form prepare_field_catalog1
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog1 CHANGING pgt_fieldcat1 TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-fieldname = 'SEATSMAX'.
    ls_fieldcat-scrtext_m = 'MAX. SEATS'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = ' '.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'SEATSOCC'.
    ls_fieldcat-scrtext_m = 'SEATS OCCUPIED'.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout1
    text
    -->GS_LAYOUT text
    FORM prepare_layout1 CHANGING gs_layout1 TYPE lvc_s_layo.
    gs_layout1-stylefname = 'FIELD_STYLE'.
    gs_layout1-zebra = 'X'.
    gs_layout1-grid_title = 'DETAILS'.
    gs_layout-sel_mode = 'C'.
    gs_layout1-info_fname = 'RCOL'.
    gs_layout-no_toolbar = 'X'.
    ENDFORM. "prepare_layout
    *& Form data_retrival1
    text
    FORM data_retrival1.
    SELECT seatsmax
    seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list1
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    *& Form exclude_tb_functions
    &---- subroutine to exclude toolbar options -
    text
    -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_maximum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_minimum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sort.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_filter.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. "data_retrival1
    *& Form cell_info
    text
    FORM cell_info. "CHANGING pt_cell TYPE lvc_t_cell.
    DATA lt_cell TYPE lvc_t_cell WITH HEADER LINE.
    CALL METHOD gr_alvgrid->get_selected_cells
    IMPORTING
    et_cell = lt_cell[].
    LOOP AT lt_cell.
    WRITE : lt_cell-col_id , lt_cell-row_id.
    ENDLOOP.
    MODIFY pt_cell[] from lt_cell[].
    ENDFORM. "cell_info
    *& Form set_col
    text
    FORM set_col .
    DATA ls_cellcolor TYPE lvc_s_scol.
    LOOP AT gt_list.
    IF gt_list-price GT 500.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 5.
    ls_cellcolor-color-int = 1.
    ls_cellcolor-color-inv = 0.
    APPEND ls_cellcolor TO gt_list-colors.
    else.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 3.
    ls_cellcolor-color-int = 1.
    APPEND ls_cellcolor TO gt_list-colors.
    ENDIF.
    MODIFY gt_list.
    ENDLOOP.
    ENDFORM. "set_col
    *& Form set_col1
    text
    FORM set_col1.
    data : ind type sy-tabix,
    indx type sy-tabix.
    loop at gt_list1.
    ind = sy-tabix / 2.
    indx = sy-tabix - ind.
    if indx eq ind.
    gt_list1-rcol = 'C500'.
    endif.
    MODIFY gt_list1.
    endloop.
    ENDFORM. "set_col
    *FORM TITLEBAR.
    *SET TITLEBAR 'TITLE'.
    *ENDFORM.
    *double click on TITLE and write ur title
    Thanks,
    Samantak.
    Rewards points for useful answers.

Maybe you are looking for

  • How to change the Reconciliation Account of a Customer.

    Hi Everybody, I went through few posts from users regarding the change of Reconciliation Account in Customer Master, but nowhere the complete process of change of Reconciliation Account is explained. Can anyone throw some light on this and tell  the

  • A message from Creative to the Sound Blaster forum participa

    We have read the strong feedback about Creative's forum post regarding driver development by Daniel_k and other outside parties. Creative's message posted on our behalf by our Company spokesperson tried to address our concern about the improper distr

  • Hd and OS question

    Hello, somebody could tell my why I had this situation after winXPpro?!? Think it's a controller matter, anyway... Mobo 875P Neo, controller SerialATA/RAID Promise on board. I had 2 NTFS partitions on my hd. They where called C and D, and then a dvd

  • Can I created a calendar in spanish

    I am trying to create a calendar in spanish.  Does anyone know how to do that?

  • IPod restarts itself on boot screen repeatedly

    I am unable to turn on my iPod nano 2gen normally. Neither is recognized if plugged in to a PC. When I hold the center and menu buttons together the apple logo appears for 5-6 seconds, then it fades out as if I have held them again. The whole thing r