Problem with coloring cells in dynamic fieldcatalog

Hi All,
I am trying to color cells based on the values in the cells. Here we are using dynamic fieldcatalog and internal table to build the ALV grid.I am getting problem in adding a field to the fieldcatlog which is of type lvc_t_scol. This Part of the code is used to build fieldcatlog dynamically.
DEFINE add_cat.
    add 1 to lv_count1.
    lwa_fldcat-col_pos     = lv_count1.
    lwa_fldcat-fieldname = &1 .
    lwa_fldcat-reptext   = &2.
    lwa_fldcat-inttype   =  &3.
    lwa_fldcat-intlen    = &4.
    append lwa_fldcat to lt_fldcat .
  END-OF-DEFINITION.
*Add Columns to the fieldcatalog
  add_cat c_proj 'Project' 'C' '30'.
  add_cat c_cust 'Customer' 'C' '30'.
  lwa_fldcat-col_pos     = 12.
    lwa_fldcat-fieldname = 'cellcolor' .
    lwa_fldcat-reptext   = 'cell color'.
<b>    lwa_fldcat-inttype   =  'lvc_t_scol'.</b>
    append lwa_fldcat to lt_fldcat .
Here i want to assign internal table(lvc_t_scol) to the fieldcatalog as a field.But  lwa_fldcat-inttype is of size 1 which will take one char. Is there any way that we can assign field of type internal table to the field catalog. Becoz of this i am unable to color cells in my ALV grid.
Thanks

It is not possible with the METHOD cl_alv_table_create=>create_dynamic_table to include another table inside that newly generated table.
I have tried to do it with the code and I got the dynamic table created after at the end of the program.
In the code,
<DYN_TABLE> has same effect as your <table> variable
<DYN_WA> has same effect as your <HEADER>
REPORT  ZTEST_NP_DYNAMIC.
DATA: DY_TABLE TYPE REF TO DATA,
      DY_LINE  TYPE REF TO DATA.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
               <DYN_WA>,
               <DYN_FIELD>.
FIELD-SYMBOLS: <FS> TYPE ANY.
* To generate the Dyanmic table with the COLOR
DATA: LS_SOURCE TYPE STRING.
DATA: LT_SOURCE LIKE STANDARD TABLE OF LS_SOURCE WITH HEADER LINE.
DATA: L_NAME LIKE SY-REPID.
DATA: L_MESSAGE(240) TYPE C,
      L_LINE TYPE I,
      L_WORD(72) TYPE C.
DATA: L_FORM(30) TYPE C VALUE 'TABLE_CREATE'.
LT_SOURCE = 'REPORT ZTEST_SUBROUTINE_POOL.'.
APPEND LT_SOURCE.
LT_SOURCE = 'FORM  TABLE_CREATE USING I_FS TYPE ANY.'.
APPEND LT_SOURCE.
LT_SOURCE = 'DATA: BEGIN OF LT_GENTAB OCCURS 0.'.
APPEND LT_SOURCE.
LT_SOURCE = 'DATA: BUKRS TYPE BUKRS. '.
APPEND LT_SOURCE.
LT_SOURCE = 'DATA: BKTXT TYPE BKTXT. '.
APPEND LT_SOURCE.
* you can add your fields here.....
LT_SOURCE = 'DATA: COLOR TYPE lvc_t_scol. '.  " <<
APPEND LT_SOURCE.
LT_SOURCE = 'DATA: END OF LT_GENTAB.'.
APPEND LT_SOURCE.
LT_SOURCE = 'DATA: POINTER TYPE REF TO DATA.'.
APPEND LT_SOURCE.
LT_SOURCE = 'CREATE DATA POINTER LIKE STANDARD TABLE OF LT_GENTAB.'.
APPEND LT_SOURCE.
LT_SOURCE = 'I_FS = POINTER.'.
APPEND LT_SOURCE.
LT_SOURCE = 'ENDFORM. '.
APPEND LT_SOURCE.
L_NAME = 'ZTEST_SUBROUTINE_POOL'.
CATCH SYSTEM-EXCEPTIONS GENERATE_SUBPOOL_DIR_FULL = 9.
  GENERATE SUBROUTINE POOL LT_SOURCE NAME L_NAME
           MESSAGE L_MESSAGE LINE L_LINE WORD L_WORD.  "#EC CI_GENERATE
ENDCATCH.
IF NOT L_MESSAGE IS INITIAL.
  MESSAGE E000(0K) WITH L_MESSAGE L_LINE L_WORD.
ENDIF.
ASSIGN DY_TABLE TO <FS>.
PERFORM (L_FORM) IN PROGRAM (L_NAME) USING <FS>.
ASSIGN DY_TABLE->* TO <DYN_TABLE>.
* Create dynamic work area and assign to FS
CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
ASSIGN DY_LINE->* TO <DYN_WA>.
Write: 'bye'.
Regards,
Naimesh Patel

Similar Messages

  • Problem with adding cells in dynamic  table

    I have a very simple table set up for listing prices. Only two columns. One is the description and the other is the cost. I've used a previous posted Java script but Adobe will not let me put in prices.
    This is the script:
    ar jpt = xfa.form.form1.Page1.TableSub.resolveNodes("Item[*]");
    var sum = 0.0;
    for (i = 0;
    i < jpt.length; i++)sum += jpt.item(i).resolveNode("Money").rawValue; this.rawValue = sum;
    It just sits at $0 and never adds anything.

    Ok, I figured it out. I had to go down another subform. I remembered Adobe viewed tables as a type of subform.

  • I have a problem with color prints from photoshop elements 12. The pictures are too light and with strange colors. I have a Canon pixma mg615I0 printer and use mac os X yosemite. The pictures are taken with a coanon eos 550d in the color space sRGB. I hav

    Hi
    I have a problem with color prints from photoshop elements 12. The pictures are too light and with strange colors. I have a Canon pixma mg615I0 printer and use mac os X yosemite. The pictures are taken with a coanon eos 550d in the color space sRGB. I have followed adobes recommendations and have tried both letting the printer respektive photoshop manage the colors. But nothing works. I see that there are different opinions about which is best to do so I tried both. I have the latest printer driver installed. Can anyone help me with this?

    Do the following:
    Print a test page from the printer. Perhaps the print head needs cleaning via its maintenance facility.
    Let the printer manage colors, not PSE
    Calibrate the monitor

  • Problems with colors running CS4 and W7.

    Hey everyone.
    I'm having some MASSIVE problems with colors on my system.
    Windows 7 Prof 64bit
    Photoshop CS4 64bit
    6g Ram
    1T hard drive
    Nvidia GeForce 9800 GTX+
    Dell SE198WFP Monitor 
    The system itself is a Dell Inspiron 530 that I put into a Black Widow V9 gaming tower. 
    Here is an example of the issue I'm having: 
    http://findae.deviantart.com/art/Converge-101214480
    http://i38.tinypic.com/bjcymr.jpg 
    The top image is a (admittedly old and crappy, but it shows the problem) photo that I had previously edited and put in my portfolio. The tinypic below is the result of copying that photo from the portfolio, pasting it into photoshop, and then saving it into a jpg. As you can see, the transitions between colors and the contrast are a complete mess. 
    Thing is, my hard drive recently quit on me, and I had to install the operating system and such on a new drive. I remember having this problem with the system when I first had it, but it either went away on its own or I fixed it somehow before. Now I can't remember for the life of me how I got rid of the problem, and I certainly don't know what the problem is in the first place. I'm tempted to think it may not be photoshop itself, but the problem seems to be especially bad when I'm working with photos. 
    Anyone have any idea what the problem might be and how to solve it? 
    Edit: I also noticed it when viewing http://findae.deviantart.com/gallery/#/d1hni37 in firefox, whereas the other photo appeared to be ok before I copied and pasted it. It has extremely obvious lines of green and orange in the transition from light skin tone to dark skin tone. Annoyingly enough, this doesn't show up in the thumbnail within my gallery at all, only when I click on the thumbnail and see the fullsize image. Extremely frustrating.  
    Here's another good look at the problem while selecting a color in photoshop: http://i37.tinypic.com/2h6t7gh.jpg  All I did was screenshot it a few times, and it deteriorated to that point.

    Screen glitches like color blocks appearing where they shouldn't could indicate a problem with your video drivers.
    Go to the nVidia site and see if they've released any updated drivers; people often report that updated drivers are correcting current problems with Photoshop.
    http://www.nvidia.com/object/win7-winvista-64bit-258.96-whql-driver.html
    Note the recent (3 weeks ago) release.
    -Noel

  • Problem with colors showing in PE10

    Is there a known problem with color in Elements 10?
    I have a gif that when opened in paint shows the light blue color correctly but in PSE10 shows as a buff color.
    Red, yellow and blue seem about right.
    It doesnt matter if it is the gif or the psd file the color showns the same in PSE10.
    Is there a setting or could something be corrupted.

    Bump.
    I have uninstalled and reinstalled Elements and get the same result.
    Is there a way to adjust the colors represented in Elements 10?

  • Inner table output to Excel with colored cells?

    Hi!
    I would like to output my inner table into Excel ducoment.
    And it is important to have Excel document with colored cells.
    I have searched for this solution, but could not find...
    Any help will be awarded!
    Kind regards, M.

    Hi,
    You can use function module "XXL_SIMPLE_API"
    or alternatively use "XXL_FULL_API".
    On the import, parameter name "N_KEY_COLS" is used to colour fields. The headings are automatically coloured. 1 is the default value.
    This reply is nearly 1 year after the last post
    Regards,
    Daniel

  • Strange problem with color measure in Mac.

    Hello, I am having a strange problem with color measure in Mac. For example i create a gradient in Photoshop from color 200 200 200 to color 240 240 240. When i measure the color of the gradient with the color measure tool of Photoshop or with the built in OS X color measure tool the measured color is from 200 199 197 to 240 240 238. I have measured the same gradient with Photoshop for PC and the values are OK (the same values that i create).
    I dont know what is the problem, but i belive that the colors that i create would be the same that i measure after creating them, and also the same values between Mac and PC. I will appreciate it a lot any help or information that you could give me that helps me to understand what is happening here.
    Thank you for your time
    Marcelo.

    Yep you got it, proof as monitor basicaly strips out any profiling and just delivers it straight.
    is there any way to make the OS X color measure tool to measure the original color values
    You mean the document colors - No, like I said photoshop is filtering your image through document profile, proof setup and monitor profile. Why do you want to use Digital color meter anyway for this?
    i dont understand what is the point to measure color values that will change every time a calibrate my monitor.
    Because color values are 'bigger' than whats on your monitor. Your monitor (via photoshop) is only doing the best it can to display those values - which can be anything from LAB colors outside the gamut of your monitor - to CMYK colors. Calibrating it is the only way to allow your monitor to do this in any way accurately. (not ever really possible) Monitors have a certain gamut and are only dispays/representations of the REAL colors that a document, with a profile, holds. So there's only one good reason to measure monitor values, and that's to generate a monitor profile.

  • CS 4 Dynamic Link to Encore doesn't work most of the time.  Encore stops operating after opening and periodically Premier Pro stops working.  I'm told that there has been a problem with CS4 when using Dynamic Link to go to Encore and build CD's.  Is there

    CS 4 Dynamic Link to Encore doesn't work most of the time.  Encore stops operating after opening and periodically Premier Pro stops working.  I'm told that there has been a problem with CS4 when using Dynamic Link to go to Encore and build CD's.  Is there a way around this?  Is there a patch to correct it?

    To build CD's???
    What problem does Encore have with DL?
    If DL is not working properly for you the way around this is to export from Premiere to either mpeg2-dvd for DVD or BluRay H.264 for BD-disks and import the files in Encore.

  • Java update causes problems with color printing in Mac 10.5

    Had a big problem with color printing for the last two weeks. Thought the printer was broken because it would freeze and refuse to be "seen", or would generate error messages. Bought new Samsung 315, and had the SAME problem. Bought new HP CP1518ni, and had the SAME problem. Not resolved after talking to tech support at both places.
    Looked for software updates around the time of the onset of printing problems. on May 15 installed "Java for Mac OS X 10.5 update" (1.0) (am running on 10.5.8). Removed the Java preferences files (com.apple.java......plist) and restarted.
    Problem solved! Clearly not the printer.

    Hmmm. This is about the time my printer stopped printing too. I've now had two printers in my house and had trouble with both of them. What a pain we should not have to delete updates for our stuff to work together.
    Renee

  • Printing problem with gray cells in smartforms

    Hi there,
    i have developed a smart form with some color logo and some gray shaded cells. If i print it by SAPLPD it comes out fine but when i print it on a printer configured in SAP it doesn’t come out properly. All the gray cells print as black cells. Any advice?
    Regards.

    Asif,
    it some times depends upon the printer drivers also
    i faced the same problem with one printer then i tried with the other hpcolor printer then i got the printout perfectly that means sometimes the drivers of the printer will crash with the program
    so its better u try this one in the another printer
    if u have this problem futher let me know
    Regards
    naveen

  • Problem with colors and bits

    So I have this problem, I made a drawing with my tablet in 32bit color in photoshop and I want to save it as a TIFF file, but when I save it the image that is the tiff file is black and white and the cuality is not good.I think there is some kind of problem with the RGB color.If someone can tell me how to fix this ?
    Also when I try to change the image to 16 or 8 bit(so I can save it as a JPEG file), it looses all its effect like details made with brush with low opacity.I really hope someone can help me out

    Just to be clear, 32 bit color (when used with an RGB image) is 32 bits each for red, green, and blue = 96 bits / pixel.
    The use of images carrying 32 bit color is uncommon, and this format is used primarily in editing to deal with High Dynamic Range imagery.  I suspect whatever tool you're using to view the TIFF you saved with 32 bit color is unable to deal with the format, which is why you're seeing it looking poorly and in black and white.
    Your instinct is correct to reduce the bit depth to save in a more common format.
    However, you should not be seeing a visible degradation when reducing the bit depth to 16 bits / channel.  That's still a very accurate format.  How are you "changing the image to 16 or 8 bit", specifically?
    -Noel

  • Problem with colors when print to pdf in FM9

    Hi,
    we have some problems with printing colors to pdf with FM9.
    The FM document contains (1) eps file with a green box and (2) a rectangle created with FM graphic tools, filled with the same green color values (91/0/60/44)
    In FrameMaker the two colors really looks different, but so what, in the PDF both colors (eps) and rectangle got the same correct green color.
    Ok, the were different in creation, so they were CMYK and RGB, but your print shop could manage that.
    Now in FM 9:
    (1) If I do a "save as PDF"  and switch OFF "convert CMYK to RGB" the resulting PDF is the same as from FM8 (correct)
    (2) If I print to PDF via distiller and define the job options to "convert all colors to CMYK" the resulting rectangle green is very  different from the eps green.
    I tried different job options, the best result was "convert all colors to CMYK", other options just very more ugly.
    Does someone of you know a solution for your problem? Help is very appreciated. I could send example files if necessary.
    Thanks in advance.
    PK

    PK-ulm wrote:
    But we want to use the print option, using the distiller.
    Pia,
    this last sentence needs some explanation, I think. Why do you want to use the print option?
    Using the print option, you still go the same route as FrameMaker Win always did, which is using the RGB-only Windows postscript driver. Now, with FM9, you have the option to get CMYK colors directly to PDF, as defined, without any color conversion. And it *does* work, as long as you restrict your documents to either CMYK colors or spot colors coming from the FM libraries.
    So, again: why do you want to use the print option?
    On a sidenote: I'm not sure if I interpret your username correctly, but if you are able to understand German, you'll find some in-depth color tests made with FM9 here: http://www.hilfdirselbst.ch/foren/FM_9_und_Farben_in_PDFs____getestet_P387800.html
    Bernd

  • Problems with color matching when printing...

         Hi, I work for a small family business in the P.O.P. industry.  We currently have myself and one other designer, we both take illustrator files that have come from the graphic design firm that we contract with and get them ready to print on our Vutek QS3200.  However ever since acquiring the printer we have begun to run into problems with the colors when printing.  When the files are exported off of my computer, I use either .tif or .pdf files, they print as they should, the colors seem to match the proof and everything goes smoothly.  However when the other designer exports a file, he tends to do mainly pdfs, the colors tend to be extremely different from where we want them.  Also we will get very strange results, such as yesterday he kept getting a faint yellow 1/2" border around his prints.  After I believe 3+ hours of him trying, I was given the original CD and instructed to try.  After 15-20 minutes of making the changes that we needed to make (adding a new price point) and ripping, mine printed perfectly. 
         We both use Macs, both have CS3 Design standard, only differences between the computers are mine is newer and a bit faster, and I'm running OS 10.5.6 and he has 10.4.  He has also at some point loaded various color profiles, whereas my CS package is just whatever the default is when I loaded it.  When we were being trained he grabbed the color profile off of the Colorburst RIP server and loaded onto his computer, plus I believe he has a couple for freelancing purposes on there as well.  My thought is that these profiles are somehow corrupting the files that are going through that computer, but I honestly am lost with it at the moment.  He believes the problem lies within the fact that he does not have the newer OS, I honestly cannot see that as having any effect on this at all.  I was wondering if anyone has run into any similar problems, or if anyone might have any advice on this issue?  I would really like to be able to solve this, as I was hired to do mainly structural design for the P.O.P. and I'm having to put in a lot of overtime to get my work done along with the additional work that I'm having to do.
    Thanks for your time

    I've got a few years experience calibrating large format printers.  First, the Yellow sounds like a file problem.  I used to work with two workstations, one PC ( RIP station ), and one Mac ( file prep station ).  I tend to agree with you in that the OS is probably not the problem.  But, any Colorburst profiles should remain in the RIP, not in the originator application.  My workflow consisted of creating EPS files that were based on established color settings in their given applications ( i.e., Illustrator, Photoshop ) which were interpreted by the RIP which had it's own calibrated profile ( perhaps more than one based on how many different substrates were being used ).  Your partner may be complicating things by incorporating a RIP profile prematurely.  If there are deviations big enough to be noticed, there has to be something in the application color settings that is causing some type of corruption.  This could lead back to the operating system, but I would think it lies somewhere in Bridge or the application color settings.  Start there.  You should seriously consider implementing a calibration system if you do not have one already.  Another slight possibility is the driver's ability to interpret files coming out of Leopard vs. files coming out of Tiger.  It may benefit you both to be in the same operating system dynamics, using the same driver versions and RIP profiles.  At the very least, match everything that is currently working successfully and put them on both machines.  If there is still a noticeable problem in color matching, then something is seriously wrong and you should call in a prepress profiling expert.  Hope this helps.

  • 4400F scanner has problems with color slides

    About six years after buying the 4400F scanner, I finally opened it today in order to start scanning a lot of color slides going back more than 40 years.  It seems as if the software (or the scanner itself) doesn't know where one slide ends and the next one begins.  The slide holder accommodates up to four slides.  Using several methods of scanning permitted by the software, I obtain either three or five JPEG scans.  In the case of three, the images are properly centered--only the final one is missing.  In the case of five, the images are all off-center.  
    Has anyone had a similar problem with this unit and the software when scanning slides?
    EG 

    I've got a few years experience calibrating large format printers.  First, the Yellow sounds like a file problem.  I used to work with two workstations, one PC ( RIP station ), and one Mac ( file prep station ).  I tend to agree with you in that the OS is probably not the problem.  But, any Colorburst profiles should remain in the RIP, not in the originator application.  My workflow consisted of creating EPS files that were based on established color settings in their given applications ( i.e., Illustrator, Photoshop ) which were interpreted by the RIP which had it's own calibrated profile ( perhaps more than one based on how many different substrates were being used ).  Your partner may be complicating things by incorporating a RIP profile prematurely.  If there are deviations big enough to be noticed, there has to be something in the application color settings that is causing some type of corruption.  This could lead back to the operating system, but I would think it lies somewhere in Bridge or the application color settings.  Start there.  You should seriously consider implementing a calibration system if you do not have one already.  Another slight possibility is the driver's ability to interpret files coming out of Leopard vs. files coming out of Tiger.  It may benefit you both to be in the same operating system dynamics, using the same driver versions and RIP profiles.  At the very least, match everything that is currently working successfully and put them on both machines.  If there is still a noticeable problem in color matching, then something is seriously wrong and you should call in a prepress profiling expert.  Hope this helps.

  • Color Cell in Dynamic ALV

    Hi all
    i try to put color in the dynamic alv, but i become a dump message
    Runtime Errors         OBJECTS_MOVE_NOT_SUPPORTED
    Date and Time          28.10.2010 08:46:49
    Short text
         Conversion of type "h" to type "g" not supported.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLSLVC" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         You attempted to move one data object to another.
         This is not possible here because the conversion of a data object
         of type "h" to type "g" is not supported.
    my code implementation looks like
      method validate_order_deli.
        data ls_scol        type lvc_s_scol.
        data ls_colo        type lvc_s_colo.
        data ls_aoc_percent type zsd_aoc_percent.
        data lf_deliv       type lifmg.
        data lf_db_percent  type f.
        data lf_calc_perc   type f.
        refresh et_color.
        select single *
          from zsd_aoc_percent
          into corresponding fields of ls_aoc_percent
          where acin = 'X'.
        if sy-subrc <> 0.
          exit.
        endif.
        lf_db_percent = ls_aoc_percent-percent.
    *    ls_scol-fname = if_fieldname.
        ls_scol-fname = 'MATNR'.
        if if_deliv <> 0.
          me->calc_amour_unit(
            exporting
              if_matnr  = if_matnr
              if_amount = if_deliv
              if_input  = if_deliv_unit
              if_output = if_order_unit
            importing
              ef_amount = lf_deliv
          lf_calc_perc = ( lf_deliv * 100 ) / if_order.
          if lf_calc_perc < lf_db_percent.
            ls_colo-col = cl_gui_resources=>list_col_positive.
          else.
            ls_colo-col = cl_gui_resources=>list_col_negative.
          endif.
          ls_scol-color = ls_colo.
          append ls_scol to et_color.
        else.
          exit.
        endif.
      endmethod.                    "validate_order_deli
      method add_color_field.
        data ls_fcat type lvc_s_fcat.
        ls_fcat-fieldname = 'COLOR'.
        ls_fcat-ref_field = 'COLTAB'.
        ls_fcat-ref_table = 'CALENDAR_TYPE'.
        append ls_fcat to ct_fcat.
      endmethod.                    "add_color_field
          ls_lvc_s_layo-cwidth_opt = 'X'.
          ls_lvc_s_layo-ctab_fname  = 'COLOR'.
    i don't no, what's wrong...
    thx for help

    *&      Form  generate_alv
    *       text
    form generate_alv.
      field-symbols <lt_any_table> type any table.
      if lrf_gui_custom_container is initial.
        create object lrf_gui_custom_container
          exporting
            container_name = lf_container.
        create object lrf_gui_alvgrid
          exporting
            i_parent = lrf_gui_custom_container.
        ls_lvc_s_layo-cwidth_opt = 'X'.
        ls_lvc_s_layo-ctab_fname  = 'COLOR'.
        check sy-subrc = 0.
        call method lrf_gui_alvgrid->set_table_for_first_display
             exporting
    *             i_buffer_active               =
    *             i_bypassing_buffer            =
    *             i_consistency_check           =
    *             i_structure_name              = 'ZAM_CELL_COLOR'
    *             is_variant                    = ls_disvariant
    *             i_save                        = 'A'
    *             i_default                     = 'X'
               is_layout                     = ls_lvc_s_layo
    *             is_print                      =
    *             it_special_groups             =
    *             it_toolbar_excluding          =
    *             it_hyperlink                  =
    *             it_alv_graphics               =
    *             it_except_qinfo               =
    *             ir_salv_adapter               =
              changing
                it_outtab                     = <gt_table>
                it_fieldcatalog               = gt_dyn_fcat
    *             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.
      endif.
    endform.                    "generate_alv
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status 'ZAM_CELL_STATUS'.
      set titlebar 'ZAM_CELL_TIT'.
      perform generate_alv.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      data lf_okcode type syucomm.
      call method cl_gui_cfw=>dispatch.
      lf_okcode = ok_code.
      case lf_okcode.
        when 'EXIT'.
          set screen 0.
          leave screen.
        when 'CANCEL'.
          leave program.
        when 'BACK'.
          set screen 0.
          leave screen..
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

Maybe you are looking for