How to handle Fcodes of custom buttons in REUSE_ALV_GRID_DISPLAY_LVC

Hi Experts,
I am using the REUSE_ALV_GRID_DISPLAY_LVC function module in my z function module to display ALV. I also changed the pf status and wrote the form for USER_COMMAND, but the itab IT_ZCP_DEMAND_SYS1 is not regocgnized in this form. Kindly tell how can i make internal table visible inside another form.
FUNCTION ZCP_ALV_GRID.
PERFORM DISPLAY_GRID  TABLES IS_ZCP_DEMAND_SYS1  USING IS_LOC IS_MAT IS_CUST IS_DATE_S IS_DATE_E .
ENDFUNCTION.
FORM DISPLAY_GRID TABLES ISV_ZCP_DEMAND_SYS1 USING ISV_LOC ISV_MAT ISV_CUST ISV_DATE_S ISV_DATE_E .
SET PF-STATUS 'ZCP_STATUS'  OF PROGRAM 'SAPLZCP_USEREXIT'.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                =
*   I_BUFFER_ACTIVE                   =
   I_CALLBACK_PROGRAM                =  gd_repid
   I_CALLBACK_PF_STATUS_SET          = 'ZCP_STATUS'
   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
   I_GRID_TITLE                      = 'Mainatin cell entry'
*   I_GRID_SETTINGS                   =
   IS_LAYOUT_LVC                     = GS_LAYOUT
   IT_FIELDCAT_LVC                   = I_FIELDCAT[]
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS_LVC             =
*   IT_SORT_LVC                       =
*   IT_FILTER_LVC                     =
*   IT_HYPERLINK                      =
*   IS_SEL_HIDE                       =
   I_DEFAULT                         = 'X'
*   I_SAVE                            = 'X'
*   IS_VARIANT                        =
***   IT_EVENTS                         = IT_SLIS_EVENT
***   IT_EVENT_EXIT                     = IT_EVENT_EXIT
*   IS_PRINT_LVC                      =
*   IS_REPREP_ID_LVC                  =
   I_SCREEN_START_COLUMN             = 30
   I_SCREEN_START_LINE               = 14
   I_SCREEN_END_COLUMN               = 120
   I_SCREEN_END_LINE                 = 25
*   IT_EXCEPT_QINFO_LVC               =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = IT_ZCP_DEMAND_SYS1
EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
ENDFORM.
FORM USER_COMMAND USING i_ucomm LIKE sy-ucomm i_s_selfield type slis_selfield.
TYPE-POOLS: SLIS.
DATA: IT_ZCP_DEMAND TYPE TABLE OF  ZCP_DEMAND_SYS.
break-point.
CASE i_ucomm .
when 'NEW'.
loop at IT_ZCP_DEMAND_SYS1.
endloop.
endform.
Thanks in advance.

This sample works, perhaps u can understand your problem:
TYPE-POOLS: SLIS.
DATA: I_CALLBACK_PROGRAM TYPE SY-REPID.
DATA: T_T001 TYPE TABLE OF T001.
START-OF-SELECTION.
SELECT * FROM T001 INTO TABLE T_T001.
I_CALLBACK_PROGRAM = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
  EXPORTING
    I_CALLBACK_PROGRAM                = I_CALLBACK_PROGRAM
    I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
    I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
    I_STRUCTURE_NAME                  = 'T001'
  TABLES
    T_OUTTAB                          = T_T001.
FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                         RS_SELFIELD TYPE SLIS_SELFIELD.
  CASE R_UCOMM.
    WHEN 'MY_CODE'. MESSAGE I208(00) WITH R_UCOMM.
    WHEN OTHERS.
  ENDCASE.
ENDFORM.                    "user_command
FORM SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
  SET PF-STATUS 'MY_ALV' EXCLUDING RT_EXTAB .
ENDFORM.                    "SET_PF_STATUS
The status gui MY_ALV is copied for the standar gui STANDARD_FULLSCREEN of program SAPLKKBL
Max

Similar Messages

  • How to handle "ok" and "cancel" button of dialog popup?

    Hello everyone,
    I'm using a dialog with type="okCancel". My question is how to handle ok and cancel button of this popup window. Here is my code below:
    <af:popup id="kriterPopup">
    <af:dialog title="Kriter Seçiniz" type="okCancel" inlineStyle="width:500px;height:400;" id="d2"
    dialogListener="#{BasvuruDegerlendirmeBean.kriterDialog}">
    <af:selectManyCheckbox label="Kriterler :" id="smc2"
    binding="#{BasvuruDegerlendirmeBean.kritersCheckbox}">
    <af:forEach items="#{BasvuruDegerlendirmeBean.kriterList}" var="item">
    <f:selectItem itemLabel="#{item.ybKriter.tur}" itemValue="#{item.ybKriter.tur}" id="si3"/>
    </af:forEach>
    </af:selectManyCheckbox>
    </af:dialog>
    </af:popup>
    I want to handle ok and cancel button of this window, and redirect to the pages which I want.
    Can anyone help me how I can do?
    Thanks, with my regards.
    Ali

    You need dialogListener..
        public void dialog1_dialogListener(DialogEvent dialogEvent) {
            if (dialogEvent.getOutcome().equals(DialogEvent.Outcome.yes)){ //for Yes
            }else{ //for Cancel
        }

  • How to handle too many custom UITableViewCells in UITableView?

    In my iphone app, I need to display many custom rows (maybe thousands or even more) in the UITableView. I add one custom UIView onto each UITableViewCell in "- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath" function, so there will be allocate much memory for the all my custom UIViews. When I add 500 rows into the UITableView, the memory ran out, then the app crashed. I think maybe there is something wrong with my code or design, I don't know how to handle this (thousands custom rows in UITableView). Please help me.... Thanks very much..
    Below is the my code:(if I have thousands of rows, the following code will allocate thousands of CustomViews), is there any way that not allocate so many CustomViews?
    // Customize the appearance of table view cells.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    **cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 110, 25) reuseIdentifier:CellIdentifier] autorelease] ;
    // Set up the cell...
    CustomView *cellView = [[CustomView alloc]initWithFrame:CGRectMake(1, 1, 108, 24)];
    [cell addSubview: cellView];
    [cellView release];
    return cell;
    }

    Hi,
    well you should add the customView if you need to create a new cell only. Any reused cell will contain this customview allready since you've added it when the cell was created.
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 110, 25) reuseIdentifier:CellIdentifier] autorelease];
    // Add customView to new cell's only
    CustomView *cellView = [CustomView alloc] initWithFrame:CGRectMake(1, 1, 108, 24)];
    [cell addSubview: cellView];
    [cellView release];
    // Set up the cell...
    return cell;

  • How can I create a custom button for opening a form?

    I have a parent form having child forms. In my main form I want to create custom buttons for opening child forms. I want to use master-detail form but there are more than one child forms, and in master-detail form I can only create one detail form. So I will create a form based on a table and in that form I will call the child forms by custom buttons. Can I do that?
    Thanx,
    Gulsah.

    This can be easily done. First open up two instances of your Portal. In one window, you will need to go into your component you wish to link FROM. In the other window you will need to go into your component you wish to link TO. In the component you wish to link TO there will be a moduleid. Note this somewhere. Then, you will see an area that says: "Call Interface: Show". Click on this. (In the window you are linking to.). In this window, you will see a bunch of stuff. At the bottom you will see a URL call. This is the call you need to use. At the top, it explains each piece of the URL call. Just subsitute YOUR appropriate information into the URL call. In the form you wish to link FROM, create a button. Once you create this button, it will appear at the bottom, click on it and you will see an area to insert a Javascript. Click the onClick and insert:
    //this is the variable you want to pass from one form to the other
    get_field_name = getField(this.form,'COLUMN_NAME_IN_DATABASE');
    //this is so you can open the "child" form
    window.open('/pls/cc_prod/DAD_NAME.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=MOD_ID_HERE&p_arg_names=_sessionid&p_arg_values=&p_arg_names=COLUMN_NAME_IN_DATABASE&p_arg values='+GETFIELD_NAME+'&p_arg_names=_COLUMN_NAME_IN_DATABASE_cond&p_arg_values=%3D');
    In the fourth tab, where it says, "....before displaying form" insert the following: (This will tell the form how to handle the getField function.)
    htp.p('<script language="JavaScript1.3">
    < !--
    function getField(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    for (var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName)
    return form.elements[i].value;
    //-->
    </script>');
    I hope this helps.
    null

  • Duplicate check via BAS (ADDRESS_SEARCH)-- how to handle non-crm customer?

    Dear all,
    I'm implementing a duplicate check and using the BADI Address_search. Within this BADI I use the method "Address_Search" for calling a third party software tool with customer information. This tool checks whether the entered customer is already available in CRM AND in other system in our company holding.
    The method provides me a list of all found duplicates (incl. non-crm customers)
    My problem is that I need to fill a export table "ex_t_search_result" (type adkey_indx_tab) of this method which expects ADRC number. For the CRM customer it is not a problem. I can figure them out by table BUT020 and the customer number. But for the non-crm customer I do not have a ADRC number.
    I know there are some methods for creating addresses in BAS (function group SZA0), but actually Im not sure how to handle them.
    Does anybody of you had faced a similar issue?
    Thanks for your help
    Firat C.

    hello,
    BP is BDT (Business Data toolset) enabled (you can check it by adding break point in FM BUS_PBO and executing BP transaction). You can add your check directly to standard view (the check will be executed each time when user pushes enter) or you could add you check to appropriate action (during saving etc.) there are number of actions which you could use it depends on your requirements. You can find a lot of info about BDT (if you are not familiar) in Wiki.
    br,
    dez_

  • How do you make a custom button that is Invisible When not selected

    Im just recently switching over to using a mac for authoring. I really like all the features in DVD Studio more than what i was using on a PC for the past 6 years. Which was ulead DVD Workshop 2.
    The only problem im having (For Now) is that i cant make my custom buttons invisible. I made this little black shape thing in photoshop and i want to use it in DVDSP for selecting different tracks.
    I thought all i had to do was just save the black shape with a transparent background in photoshop as a .psd and import it. But that didnt work.
    When i change episodes it just stays black the whole time. I want something that will be invisible when it is not selected.
    please help
    I can send someone my little shape if they can make it a usable button that i can make invisible in dvdsp. I really need to see the layers done with a shape as a button to see how they were able to make it invisible.
    i tried a few tutorials but instead of being invisible all i got was a shape that was stuck white the whole time. this is even when i put the opacity to 0 on normal.
    I want to make this into a button
    http://img694.imageshack.us/i/custonbutton.png/

    Ok, what you want to do is also in the same tutorial. See the section on "Advanced Highlights" (again, avoid the sections on layered menus), You can create an overlay that does have two colors. The bad news is that there will be absolutely no anti-aliasing at all. This means your graphic will be extremely pixelated. This is just the way the DVD specs are set up, so there is no way around it.
    Given that I would highly recommend redesigning your overlay. Take a look at variety of DVDs from Hollywood. See what they are doing in their menus. You can do anything they are doing, but you will notice that the overlay is very simple because of the limited anti-aliasing of DVDs. In all the years that I've been watching DVDs I've only see one DVD use two colors in the overlay, and that was the Jim Carey "The Grinch who Stole Christmas."

  • How to handle timestamp in custom scheduled task written for Target Recon

    Hi,
    I have wriiten a Custom scheduled task to reconciile users from target system..but whenever I run the Target Recon Scheduled task .. it generates the Recon. events for all users.
    How to handle this.. how to pass Timestamp value to custom Target Recon scheduled task.
    Thanks,
    Pallavi

    To add to Kevin's point -
    You will have to have a attribute either in the IT Resource or the Schedule Task. At the begining of the reconciliation searches, get the timestamp of the target system and store it in a variable. Fectch the timestamp attribute value from the IT Resource/Schedule Task and use that value as one of the search criteria of user profiles on the target.
    Once all the user profiles from the target are queried and reconciliation is completed then update either the IT Resource or Schedule Task attribute using OIM API.
    Hope this helps :)

  • How to handle ok/add/update button

    hi,
       the button ui=1 automatically changes in add/update /ok buttons .but how we handle update and add ivent through database.
    Pandey
    Sai I.S.

    Hi,
    I have made a new company in SAP B1 and I Selected the Use purchase account posting system in company detail Basic Initalization tab.
    so it is post the taxes in stock account.this is not formal and i am getting problem in normal processing. so i want to know what the effects of this purchase account posting system. how it is different from normal. how can i chang this company in narmal company for normal processing .plz tell me process of changing in normal. and if i carry on futher hat will be the efect of it.
    plz give me answar quickly
    I have also a problem when i creating new company .it does not take any user name and when i open that by manager user it gives massege wrong user or passward.
    what the problem is there plz give me solution of all above.
    HP

  • How to add upgrade safe custom button

    We'd like to add a custom button to fire a custom action on the "CheckOutLinesPG".
    I tried the personalization but that won't allow me to add the custom action. How can I add an action button and is upgrade safe?
    Please advise.

    Hi,
    You may want to try the OA Framework forums.
    Brenden

  • How to handle more than one button in a form?

    Hello Java fans,
    I am new to Servlets. I am facing a problem in java servlet. I tried to place two buttons in the form. Both buttons has to invoke different servlets. How to associate action to each button?
    Thanks in advance,
    SMVEL

    Give each button a different name so that you can check which button is clicked.
    <input type="submit" name="button1" value="Press this button to invoke servlet1">
    <input type="submit" name="button2" value="Press this button to invoke servlet2">
    Then in your controller servlet:
    if(request.getParameter("button1") != null){
    //button1 is pressed.
    //forward to servlet1.
    else if(request.getParameter("button2") != null){
    //button2 is pressed.
    //forward to servlet2.
    }

  • How to handle stop and refresh button.

    i have two JSP pages. in the frist page the user has the option to either view previous ones or create a new. in both cases i pass a form id as parameter to execute the related data. in the second page , when user fills the data and clicks submit, and clicks the stop or refresh or any other button before the data gets committed and reaches the confirmation page, how do i handle it? when user clicks one of these buttons , the controller class executes again (the process request is again executed).but this time there are no parameters sent to the controller. how do i handle this? also when user clicks the back i have redirected to dialog page. but there are back,forward refresh buttons for the dialog page. if user clicks those, again there are no parameters sent to the controller class.
    how do i handle this.

    too many queries at the same time.
    1. Back button - Read the devguide and make the application/page bworser backbutton safe
    2. Refresh/Stop Buttons - either use js to restrict these, or embed logic in the code to stop undesirable behaviour.
    Thanks
    Tapash

  • How to Handle Events for JOptionPane buttons?

    Hi All,
    I need a help...
    I am trying to develop a simple SWING application that consists of multiple elements (mainly text fields) and a Submit button. On pressing Submit button, it should validate all the fields and then do something else. But if some fields are left blank, then it should give a pop-up message and on clicking the OK button on the pop-up message, the focus should go to that text field which is left null.
    The problem is I am not able to understand how to Capture this OK button click-event of the pop-up message. I mean how to do something when the OK/Cancle button of the pop-up window is clicked.
    Please Help me.
    Thanks in Advance,
    Ujjal

    As already pointed out, JOptionPane has some static methods which show a dialog, and return an int, or a string. The whole point of this class is to remove the need for any event handling by the developer, that is, you simply call the showDialog method or whatever, and it returns a value telling you, for example, which button was pressed - no need for action listeners at all. The result of the showDialog method (or whichever you use) tells you which button was pressed. Check the javadocs for JOptionPane for details of several constants that indicate which button was pressed
    The class exists to make simple dialogs trivial to generate - you're overcomplicating things!

  • How do I change the custom button to "other" in selector properties?

    Hello all. This is my first time using DW CC2014 and coming from no background in webpage development its proving to be a little tricky. I'm following the tutorial set by David Powers https://helpx.adobe.com/dreamweaver/how-to/make-style-web-page.html?set=dreamweaver--get-s tarted--ready-to-use and I'm stuck on the part titled "style the navigation bar"  Basically in my selector properties for 'mainnav ul' the fifth icon says custom instead of others as described in the video and therefor does not allow for the customizing of the navigation bar. Any assistance in clarifying this would be greatly appreciated! Thanks

    My advice is to put DW away until you fully grasp HTML and CSS fundamentals.  Trying to explain this stuff to someone who doesn't have a good knowledge of code basics is futile.  Videos don't teach code basics.  It's assumed that you already know it.
    http://www.html.net/
    http://w3schools.com/
    http://www.csstutorial.net/
    http://phrogz.net/css/HowToDevelopWithCSS.html
    http://webdesign.tutsplus.com/sessions/web-design-theory/
    CSS Class vs ID
    http://www.htmldog.com/guides/css/intermediate/classid/
    Feel free to post back if you have more questions.
    Good luck!
    Nancy O.

  • How do you create a custom button in LiveCycle to add a new form page to an existing form?

    Can someone tell me how to create a button to add a new form page to an existing form in Acrobat or Livecycle designer?

    Hi,
    You can use addInstance method to achieve your requiremnets.
    form1.#subform[1].instanceManager.addInstance()
    BR,
    Paul Butenko

  • How to handle children of custom component

    Hi,
    does anybody know an example of how to develop a custom UIComponent which is able to render any kind of child? For example:
    <x:mycomponent columns="3" valu="#{list-of-items} var="item">
    <h:graphicImage url="#{item.url}/>
    <h:selectBooleanCheckbox />
    </x:mycomponent>
    The result should be a table with 3 columns where each table-cell contains the result of the rendering process of its children, in this case a picture with a checkbox.
    I have tried it and managed to get the correct html-result. But I do not get the input of the checkbox if the above code snippet is a part of a html-form.
    So what I realy like to have is the sourcecode of some kind of UIComponent which does something like this.
    Kind Regards,
    Tobias

    Thanks for the swift reply Craig
    My custom component has 3 elements hence the currentTarget
    could be either the folder icon, the status icon or the text field.
    Is there some way of finding the parent of which ever of
    these sub items of the cusom component is clicked?
    Here is the code for my custom component
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="240" height="60" cornerRadius="15" borderStyle="none"
    backgroundColor="#ffffff" themeColor="#ff0000">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var studentName:String ="Student Name";
    ]]>
    </mx:Script>
    <mx:Text x="64" y="24" text="{studentName}" />
    <mx:SWFLoader x="10" y="10" width="32" height="24"
    source="@Embed('assets/folderIcon.swf')" />
    <mx:SWFLoader x="19" y="42" width="11" height="11"
    source="@Embed('assets/cfStatusIcon.swf')" />
    </mx:Canvas>

Maybe you are looking for

  • ISight-iChat-AIM-Skype review

    I have an iMac with a built-in iSight webcam. After working with connections in various countries over several days I find that the best iMac to PC connections are through Skype, not AIM. AIM connections were very pixilated and had a strong audio ech

  • Can't restore mini-with a twist

    My daughter's mini suddenly and spontaneously switched formats from Mac to Windows. I have no idea how as we only have Apple products in the house. I've read through the various posts about how to restore the iPod but nothing works. When hooked up to

  • Set attribute not working in conjuction with RequestDispachter

    Hi Team, In my application I have two servlets in the same package . In the first servlet i set a attribute in httpServletRequest Object and forward the request , response object to another servlet using the requestDispatcher.forward(). In the second

  • Apps and printer won't work after downloading mavericks

    Since downloading OS X Mavericks I have encountered the following problems: Unable to print from Illustrator & Photoshop. Illustrator and Photoshop crash. Macintosh HD will not always show contents (applications, library, user, etc), Unable to use Mi

  • What to do with loads of text

    What's the best way to show pages and pages of text on a page without having to scroll the page down for miles? And no, I can't break it up. It's a lot of text. I thought of a scrolling <div>...but I don't like the scroll bars. Any ideas? Dan