Dynamic Fields and Images

Hi Folks,
I have to prepare some PDFs using indesign that will be used for Invoices. Our developers want to be able to add the logo and certain fields dynamically. I wanted to find out is there anything special i need to know to do to make the fields and logo updateable dynamically in the output PDF. What is this topic even under? Would it be a scripting thing? I tried Googling around to find answers but had no luck.
Just to give you an example of what I mean by dynamic fields.... i might have a field title "Surname" with text box alongside. My developers should be able to insert the correct surname into that text box when displaying the PDF
Thanks for your help community!

is the PDF generated in indesign going be used as a graphic for the Management Information System (MIS) to put data over the top of, or are "the developers" attempting to use indesign as a database query tool?
indesign's data merge has limited capabilities and using it as a "back end" to generate invoices is something that IMHO is beyond its scope.
can the OP please give more information so that a more properly formed answer can be given?

Similar Messages

  • Dynamic fields and conditions

    Hi!
    I have created a tabular form with:
    1. Fields that users can use to filter the table
    2. Filter button to filter the data
    3. Fields where they select the column name, input the value for update
    4. Update button that updates the filtered data in a dynamic PL\SQL
    I have a set SQL query on the report that always checks all the values, so I need to have nvl function in case users don't fill all the fields.
    Problem with this is that the query lasts very long.
    Another problem is, that since I have max 3 columns for update; in case they don't fill those columns, update doesn't work.
    Is it possible to maybe create fields in a dynamic way like it is default on a report?
    And does anyone know how I could solve the problem with the update in case users select just one column name and fill just one value for update?
    Regards,
    Ivan

    It is possible to dynamically generate PL/SQL. Your problem is, you need to generate the entire program. So, if you are manipulating PL/SQL tables in your dynamic SQL you need to declare those tables and populate them in the dynamic code. Although, I suppose you could pass PL/SQL tables as parameters to EXECUTE IMMEDIATE, I've never tried. Either way, I foresee a gnarly piece of code coming up. I'm glad I don't have to maintain it.
    In the following example I shall ignore all considerations of PL/SQL tables, etc. In other words, it won't work but it will give you the idea.
    plsql_stmt := 'DECLARE l1 number; l2 number; l3 number; l4 number; BEGIN '
    plsql_stmt := plsql_stmt||' l1 := :1; l2 := :2; l3 := :3;';
    FOR lrec IN ( SELECT rownum AS r, field_1, field_2, math_op, do_something FROM rules )
    LOOP
       IF lrec.r != 1
       THEN
          plsql_stmt := plsql_stmt||'ELSIF ';
       ELSE
          plsql_stmt := plsql_stmt||'IF ';
       END IF;
       plsql_stmt := plsql_stmt||lrec.field_1||' '||lrec.math_op||' '||lrec.field_2;
       plsql_stmt := plsql_stmt||' THEN '||lrec.do_something||' ;';
    END LOOP;
    plsql_stmt := plsql_stmt||' END IF; :4 := l4; END;';
    EXECUTE IMMEDIATE plsql_stmt USING ln_abc, ln_def, ln_ghi, ln_result;
    ...Good luck, APC

  • Text Field and image side by side.

    I would like to know how to force an image to stay beside a
    text field instead of drop below it.
    http://www.liquidfirefishing.com/example.html

    Change this -
    td.special {
    background-image:url(
    http://www.liquidfirefishing.com/contact/verificationimage.php?678);background-repeat:no-r epeat;
    right:auto }
    to this -
    td.special {
    background-image:url(
    http://www.liquidfirefishing.com/contact/verificationimage.php?678);background-repeat:no-r epeat;
    background-position:right; }
    Then of course, you'd want to change this -
    <td><img src="verificationimage.php?9426"
    alt="verification image, type it
    in the box" width="50" height="24" align="absbottom"
    /></td>
    to this -
    <td> </td>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Team Liquid Fire" <[email protected]> wrote
    in message
    news:giu0rl$qp2$[email protected]..
    > Thanks. But is there a way to force it to the right of
    the cell? Right
    > now it is behind the text field.
    >
    http://www.liquidfirefishing.com/contact/

  • Dynamic field value in Sales order item table control

    Hi
    I need to find the VBAP-VKAUS (Usage indicator) field value in run time of the creation of sale order ...these values stored in the  table TVLV.
    when i debug the program SAPMV45A in the screen 4900 this VBAP-VKAUS value gets empty in structure VBAP even though i can see other values like MATNR etc...
    this field is configurable (dynamic) field and not appear for all the ordertypes.
    i need to pass this VBAP-VKAUS  value to KOMPD-VKAUS
    Thru user-exit..so please let me know if somebody knows how to find this VBAP-VKAUS  value.
    Thanks in advance
    Madi

    hi,
    Plz Check the struc KOMP/KOMK. Let me know, if this helped.
    Rgds,
    Raghu.

  • Read Data from the dynamic Field Symbol with key ?

    Dear All,
    I've  2 dynamic internal tables in the form of field symbols.
    Now,I want to loop the item field symbol, read the header field symbol content and then move the corresponding into a final field symbol.
    How to read the field symbol with key ?
    When I'm trying to give the key clause in the paranthesis it's giving a syntax error.
    Any clues ?
    FYI .....
    * Get the Dynamic Field and Value for the Date/Year and convert it into Year value
      LOOP AT <fs_t_son> ASSIGNING <wa_son>.
        ASSIGN COMPONENT gwa_znrows_def-fieldname OF STRUCTURE <wa_son> TO <fs_year>.
        IF sy-subrc = 0.
          CLEAR gv_string.
          MOVE <fs_year> TO gv_string.
          CLEAR gv_year.
          gv_year = gv_string.
          <fs_year> = gv_year.
        ELSE.
    * When the Date/year Field is not in the Table then -->
    * Get the Dynamic Field and Value
          ASSIGN COMPONENT gwa_znrows_def-kfldname OF STRUCTURE <wa_rson> TO <fs_value>.
    * Populate field for Dynamic Where condition
          CLEAR gv_value.
          CONCATENATE '''' <fs_value> '''' INTO gv_value.
          CONCATENATE gwa_znrows_def-kfldname '=' gv_value INTO gt_where SEPARATED BY space.
          APPEND gt_where.
          CLEAR gt_where.
          READ TABLE <fs_t_rson> ASSIGNING <wa_rson> ( gt_where ).  "Key clause
        ENDIF.  " if sy-subrc = 0.  "Assign
      ENDLOOP.
    Thanks & regards,
    Deepu.K

    TYPES: BEGIN OF line,
             col1 TYPE c,
             col2 TYPE c,
           END OF line.
    DATA: wa TYPE line,
          itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,
          key(4) TYPE c VALUE 'COL1'.
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    ASSIGN itab TO <fs>.
    READ TABLE <fs> WITH TABLE KEY (key) = 'X' INTO wa.
    The internal table itab is assigned to the generic field symbol <fs>, after which it is possible to address the table key of the field symbol dynamically. However, the static address
    READ TABLE <fs> WITH TABLE KEY col1 = 'X' INTO wa.
    is not possible syntactically, since the field symbol does not adopt the key of table itab until runtime. In the program, the type specification ANY TABLE only indicates that <fs> is a table. If the type had been ANY (or no type had been specified at all), even the specific internal table statement READ TABLE <fs>  would not have been possible from a syntax point of view.

  • Is it possible to dynamically change the image in a Picture Field?

    Is it possible to dynamically change the image in a Picture Field?
    Thank you

    Try using the In Proc RAS SDK.
    [Here are the sample applications.|http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/b02c1cac-ad86-2b10-88ae-cb36551bab06] Take a look at the 'Add Image' sample.
    Insert the picture at design or runtime and change the location / name of the image at runtime.
    - Bhushan.

  • Dynamic pdf up to 200 images, the size of pdf is larger, cannot save data and images to the form

    Hi all,
    My client would like to dynamic images up to 200 pictures to my forms. It is working fine. However, when I add images up to 35 images. I could not add images to the form any more. Then, I save data on the form. All images and data typed on the form are disappeared. I don't know reason.
    If I only add 10 images - I can save data and images on the form. The size of pdf is 15456 kb.  I was unable to  add more pictures or data on the form.
    Maybe there are problem the size of pdf? How much size can an dynamic pdf  limited?
    Can we save the information and images as much as we want?
    I have spent 2 weeks to work and try to figure out this problem. However it is not successful.
    Please help,
    Cindy

    You should ensure, that your users do not import big images.
    Therefore you can use a script on the change event of an image field which checks the data size and warns the user if the file is too big.
    function formatNumber(number) {
        var num = number + '',
        x = num.split('.'),
        x1 = x[0],
        x2 = x.length > 1 ? '.' + x[1] : '',
        rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
            x1 = x1.replace(rgx, '$1' + ',' + '$2');
        return x1 + x2 + "KB";
    var sizeLimit = 200, //allow upto 200KB images
      thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
    if (sizeLimit > 0) {
      if (thisSize > sizeLimit) {
      xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • How do I add a time field to a dynamic list and form?

    I'm trying to create an update form that logs when an action was taken. Among the fields are one for the date and one for the time, but I've not been able to get the time field to display or enter data correctly.
    I've set the time format in the ADDT preferences (database date and time format is yyyy-mm-dd and HH:mm:ss and screen format is dd/mm/yyyy and HH:mm). When I create the list or the form using the wizard, there is no option to display the field as a time.
    In step 3 of 4 in the Dynamic List Wizard, the 'Display as' options are: text, numeric, double and date. Choosing date for the time field gives me a display as though it was a date (I get '00/00/0000'). I have the same problem with generating a Dynamic Form in that there is no option to display a time, only a date.
    Am I able to do this using the wizard, or is there another way that I'm, missing? Thanks for any help.

    If those date/time fields are only needed for logging purposes then follow Günter's instructions.
    If you need to be able to edit those two fields and have their values displayed properly then there are several steps you should take.
    First open the page that uses the Dynamic List behavior and make sure that all date and time fields are configured to display as dates. Then open the page with the dynamic form and click on "Manage Dynamic Form Wizard" in the Developer Toolbox. Configure your date and time fields to submit as dates. Then go to the Server Behaviors panel and double click on "Validate Form". You should now have 3 date/time options available under Validation Format: Date, Datetime, and Time. Configure each field as needed.
    This will ensure that date and time fields are saved in the proper format so that when you view their values they will be displayed properly, that is dates will be displayed as dates and times as times.
    There are also several additional server formats available that are accessible through the Bindings panel that you might want to experiment with.

  • Images and image field problem

    Hi
    I would like the user to be able to upload an image that will be scaled proportionally to the size of the field pre determined.
    I understand that options of image field: "scale image proportionally" is meant for this exactly.
    For some reason, this works with images but not with image fields.
    please see a printscreen I have made of the problem: same field size and same image uploaded
    thanks

    In Lightroom, there is no specific location where the photos should go. You can put them wherever you want, based upon your storage needs and hard drive setup.
    So, with regards to your specific question, yes you can put the photos in the same folder as where the .lrcat is located, I can't see any harm, but I also don't think you need to do the work to make that happen. You can pretty much leave your photos where they are (which is easier and less time consuming) than moving them to the .lrcat folder, and easier and less time consuming than moving them at all.
    In fact, I strongly suggest you change your thought processes from "Where do I put my photos" to "How can I organize my photos". Now that you are a Lightroom user, you organize your photos from within Lightroom, not by moving them here to there, but by adding keywords and other metadata. Organizing, now that you are LR user, is not folders ... it is metadata. Searching, now that you are a LR user, is not done in your operating system and in folders, it is done in LR by searching for keywords and other metadata.

  • ALV display using dynamic field catalog and dynamic internal table

    hi ,
    please guide me for ALV display using dynamic field catalog and dynamic internal table.
    Thank you.

    Hi Rahul,
    maybe thread dynamic program for alv is helpful for you. More information about the [SAP List Viewer (ALV)|http://help.sap.com/saphelp_nw70/helpdata/EN/5e/88d440e14f8431e10000000a1550b0/frameset.htm]. Also have a look into the example programs SALV_DEMO_TABLE*.
    Regards Rudi

  • ALV and dynamic fields

    Hallo colleagues,
    I have to create a dynamic structure and show it within an ALV.
    Therefore I have created my stuctrure like this:
      MOVE 'COMP1' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>get_string( ).
      INSERT gw_component INTO TABLE gt_components.
      MOVE 'COMP2' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>get_i( ).
      INSERT gw_component INTO TABLE gt_components.
    get structure descriptor -> GR_STRUCTDESCR
      gr_structdescr ?= cl_abap_structdescr=>create( gt_components ).
    create work area of structure GR_STRUCTDESCR -> GR_WA
      CREATE DATA gr_wa TYPE HANDLE gr_structdescr.
      ASSIGN gr_wa->* TO <gw_wa>.
    So now I have my dynamic structure, but how i can create a field catalog, which fit into the function module 'REUSE_ALV_FIELDCATALOG_MERGE' and 'REUSE_ALV_LIST_DISPLAY'?
    Any help?
    Thanks in advance
    Irian

    Hi,
    REPORT zmtable LINE-SIZE 255
                   LINE-COUNT 65.
    Program written by Vijay Chaitanya Raju
    Maintain Table dynamicly (Table name is entered on Selection Screen)
    Very powerfull program. Please maintain authorisation access and
    restrict maintenance to Z-tables
    Version 6.20 and up
    (can be used in 4.6C with some modifications to block try - endtry
    and classes)
    Enhanced functionality with dynamic selection screen
    TABLES: sscrfields.                "Fields on selection screens
    TYPE-POOLS rsds.
    DATA ds_clauses TYPE rsds_where.
    DATA: BEGIN OF ifield OCCURS 0,
          fieldname LIKE dd03l-fieldname,
          position  LIKE dd03l-position,
          keyflag   LIKE dd03l-keyflag,
          datatype  LIKE dd03l-datatype.
    DATA: END OF ifield.
    DATA: sl_step    LIKE sy-tabix,
          ss_step    LIKE sy-subrc,
          ss_act(1)  TYPE c,
          sl_lines   LIKE sy-tfill,
          sl_status  LIKE sy-subrc,
          sl_subrc   LIKE sy-subrc,
          sl_update(1) TYPE c,
          sl_mandt(1)  TYPE c,
          len(6)       TYPE n,
          f_value(255) TYPE c,
          sl_datum     LIKE sy-datum,
          sl_uzeit     LIKE sy-uzeit,
          price1(15)   TYPE c,
          price2(15)   TYPE c,
          mess(60)     TYPE c,
          d_stat   LIKE sy-subrc,
          m_stat   LIKE sy-subrc,
          slchar(6) TYPE c.
    DATA: ref_ptr TYPE REF TO cx_root.      "Root class more common
    DATA: text TYPE string.
    DATA: sl_index LIKE sy-tabix.
    DATA: zauth LIKE dd02l-tabname.
    DATA: num TYPE i,
          max_len TYPE i,
          check_len TYPE i,
          sl_sel(1) TYPE c.
    TYPE-POOLS: icon.
    SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF LINE.
    text-012 - 'Table Name'
    SELECTION-SCREEN COMMENT 1(25) text-012.
    PARAMETERS: tabname LIKE dd02l-tabname DEFAULT 'ZSCARE'.
    text-003 - 'Selection'
    SELECTION-SCREEN PUSHBUTTON 75(9) text-003 USER-COMMAND sta1.
    SELECTION-SCREEN END OF LINE.
    numrows(text) - 'Max Number of ROWS'
    PARAMETERS: numrows LIKE sy-subrc DEFAULT '100'.
    At Selection-Screen                                                 *
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        WHEN 'STA1'.
          CLEAR sl_sel.
          CALL FUNCTION 'ZSTAN_SELECTIONS'
            EXPORTING
              tabname         = tabname
            IMPORTING
              ds_clauses      = ds_clauses
            EXCEPTIONS
              table_not_valid = 1
              other_error     = 2
              OTHERS          = 3.
          IF sy-subrc = 0.
            sl_sel = 'X'.
          ENDIF.
      ENDCASE.
    *At Selection-Screen Output                                            *
    AT SELECTION-SCREEN OUTPUT.
      SELECT SINGLE tabname
        INTO tabname
        FROM dd02l
        WHERE tabname  = tabname
          AND as4local = 'A'
          AND ( tabclass = 'TRANSP' OR tabclass = 'POOL'
                OR tabclass = 'CLUSTER' ).
      IF sy-subrc <> 0.
        MESSAGE 'Table is not valid' TYPE 'S'.
        RETURN.
      ENDIF.
    START-OF-SELECTION.
    START-OF-SELECTION.
      DEFINE: acheck.
        zauth = 'ZTABAUTH'.
        select single statu
          into sl_update
          from (zauth)
          where tabname = tabname
            and bname   = sy-uname.
        if sy-subrc <> 0.
          message 'You are not authorized to view this table' type 'S'.
          return.
        endif.
      END-OF-DEFINITION.
      SELECT SINGLE tabname
        INTO tabname
        FROM dd02l
        WHERE tabname  = tabname
          AND as4local = 'A'
          AND ( tabclass = 'TRANSP' OR tabclass = 'POOL'
                OR tabclass = 'CLUSTER' ).
      IF sy-subrc <> 0.
        MESSAGE 'Table is not valid' TYPE 'S'.
        RETURN.
      ENDIF.
      DATA: ptr_itab TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itab> TYPE STANDARD TABLE. "ANY TABLE.
      CREATE DATA ptr_itab TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itab->* TO <fs_itab>.
    For DELETION
      DATA: ptr_itd TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itd> TYPE STANDARD TABLE.
      CREATE DATA ptr_itd TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itd->* TO <fs_itd>.
    For MODIFICATION
      DATA: ptr_itm TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itm> TYPE STANDARD TABLE.
      CREATE DATA ptr_itm TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itm->* TO <fs_itm>.
      DATA: ptr_wtab TYPE REF TO data.
      FIELD-SYMBOLS: <fs_wtab> TYPE ANY.
      CREATE DATA ptr_wtab TYPE (tabname).
      ASSIGN ptr_wtab->* TO <fs_wtab>.
      DATA: itabname(15) TYPE c.
      itabname = '<fs_wtab>'.
    Standard list status with 'SAVE' button
      SET PF-STATUS 'STLI'.
      CLEAR sl_update.
    Maintain authorisation access in table ZTABAUTH
    Key fields:  tabname - Table name
                 bname   = sy-uname - User name
                 statu   = 'X' - maintain
                           ' ' - view
    Check authorisation access
      acheck.
      SELECT fieldname position keyflag datatype
        INTO TABLE ifield
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
        ORDER BY position.
      FIELD-SYMBOLS: <f1> TYPE ANY.
      DATA: tab_field(60) TYPE c,
            sline LIKE sy-lisel.
      DATA: field_attr LIKE dfies.
      DATA: BEGIN OF tfield_attr OCCURS 0.
              INCLUDE STRUCTURE field_attr.
      DATA: END OF tfield_attr.
      LOOP AT ifield.
        CALL FUNCTION 'G_FIELD_READ'
          EXPORTING
            table      = tabname
            fieldname  = ifield-fieldname
            text_flag  = 'X'
          IMPORTING
            field_attr = field_attr.
        tfield_attr = field_attr.
        APPEND tfield_attr.
      ENDLOOP.
      IF sl_sel = 'X'.
        SELECT *
          FROM (tabname)
          INTO TABLE <fs_itab> UP TO numrows ROWS
          WHERE (ds_clauses-where_tab).
      ELSE.
        SELECT *
          FROM (tabname)
          INTO TABLE <fs_itab> UP TO numrows ROWS.
      ENDIF.
      DESCRIBE TABLE <fs_itab> LINES sl_lines.
    Show two extra lines to allow addition up to 2 new lines
      IF sl_update = 'X'.
        DO 2 TIMES.
          APPEND INITIAL LINE TO <fs_itab>.
        ENDDO.
      ENDIF.
      DATA: info(22) VALUE 'D - Delete, M - Modify'.
      WRITE: / icon_information AS ICON QUICKINFO info.
      WRITE ' '.
      CLEAR check_len.
      LOOP AT tfield_attr.
        IF tfield_attr-datatype = 'CLNT'.
          CONTINUE.
        ENDIF.
        len = tfield_attr-outputlen.
        IF tfield_attr-keyflag = 'X'.
          check_len = check_len + len + 1.
        ENDIF.
        IF tfield_attr-scrtext_m IS NOT INITIAL.
          WRITE: AT (len) tfield_attr-scrtext_m COLOR 1.
        ELSE.
          WRITE: AT (len) tfield_attr-fieldtext COLOR 1.
        ENDIF.
      ENDLOOP.
      CLEAR ss_step.
      CLEAR ss_act.
      LOOP AT <fs_itab> INTO <fs_wtab>.
        IF sy-tabix LE sl_lines.
          ss_step = 1.
        ELSE.
          CLEAR ss_step.
        ENDIF.
    In field SS_STEP put D -  to delete record
                         M -  to modify/add new record
        IF sl_update = 'X'.
          WRITE:/ icon_change AS ICON.
          IF ss_step = 1.
            WRITE:  ss_act INPUT ON.
          ELSE.
            ss_act = 'M'.
            WRITE:  ss_act.
            CLEAR ss_act.
          ENDIF.
        ELSE.
          WRITE:/ icon_display AS ICON.
          WRITE:  ss_act COLOR 2.
        ENDIF.
        LOOP AT ifield.
    Maintain client dependant tables in the same client
          IF ifield-datatype = 'CLNT'.
            sl_mandt = 'X'.
            CONTINUE.
          ENDIF.
          CONCATENATE itabname '-' ifield-fieldname INTO tab_field.
          ASSIGN (tab_field) TO <f1>.
          IF sl_update = 'X'.
            IF ifield-keyflag = 'X' AND ss_step IS NOT INITIAL.
              WRITE: <f1> COLOR 4.
            ELSE.
              WRITE: <f1> INPUT ON.
            ENDIF.
          ELSE.
            IF ifield-keyflag = 'X' AND ss_step IS NOT INITIAL.
              WRITE: <f1> COLOR 4.
            ELSE.
              WRITE: <f1> COLOR 2.
            ENDIF.
          ENDIF.
          UNASSIGN <f1>.
        ENDLOOP.
      ENDLOOP.
    END-OF-SELECTION.
    END-OF-SELECTION.
    AT USER-COMMAND.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'SAVE'.
          IF sl_update = 'X'.
            CLEAR: sl_step,
                   sl_status,
                   sl_subrc,
                   <fs_wtab>,
                   d_stat,
                   m_stat,
                   max_len.
            REFRESH <fs_itd>.
            REFRESH <fs_itm>.
            DO.
              IF sl_status <> 0.
                EXIT.
              ENDIF.
              ADD 1 TO sl_step.
              IF sl_subrc <> 0.
                EXIT.
              ENDIF.
              CLEAR ss_step.
              CLEAR ss_act.
              READ LINE sl_step
                   FIELD VALUE ss_act INTO f_value.
              sl_subrc = sy-subrc.
              IF f_value(1) EQ 'D' OR f_value(1) = 'd'.
                ss_step = 1.  "Delete
              ELSEIF f_value(1) EQ 'M' OR f_value(1) = 'm'.
                ss_step = 2.  "Modify
              ELSE.
                CLEAR ss_step.
              ENDIF.
              CHECK sy-lisel(3) = '0Z '.
              IF ss_step GT 0.
                CLEAR sline.
                sline = sy-lisel+5(250).
                max_len = 250.
                CHECK sline(check_len) <> ' '.
                LOOP AT tfield_attr.
                  CONCATENATE itabname '-' tfield_attr-fieldname
                                                  INTO tab_field.
                  ASSIGN (tab_field) TO <f1>.
                  IF tfield_attr-fieldname = 'MANDT'.
                    <f1> = sy-mandt.
                  ELSE.
                    CLEAR f_value.
                    IF max_len LT tfield_attr-outputlen.
                      max_len = 255.
                      ADD 1 TO sl_step.
                      READ LINE sl_step.
                      sline = sy-lisel.
                    ENDIF.
                    f_value = sline(tfield_attr-outputlen).
                    max_len = max_len - tfield_attr-outputlen - 1.
                    IF tfield_attr-inttype = 'D'.
                      IF f_value CO ' 0./-'.
                        CLEAR sl_datum.
                        <f1> = sl_datum.
                      ELSE.
                        CALL FUNCTION 'CONVERT_DATE_INPUT'
                          EXPORTING
                            input                     = f_value
                            plausibility_check        = 'X'
                          IMPORTING
                            output                    = sl_datum
                          EXCEPTIONS
                            plausibility_check_failed = 1
                            wrong_format_in_input     = 2
                            OTHERS                    = 3.
                        IF sy-subrc = 0.
                          <f1> = sl_datum.
                        ELSE.
                          text = 'Invalid Date'.
                          sl_status = 1.
                          EXIT.
                        ENDIF.
                      ENDIF.
                    ELSEIF tfield_attr-inttype = 'T'.
                      IF f_value CO ' 0:'.
                        CLEAR sl_uzeit.
                        <f1> = sl_uzeit.
                      ELSE.
                        CALL FUNCTION 'CONVERT_TIME_INPUT'
                          EXPORTING
                            input                     = f_value
                            plausibility_check        = 'X'
                          IMPORTING
                            output                    = sl_uzeit
                          EXCEPTIONS
                            plausibility_check_failed = 1
                            wrong_format_in_input     = 2
                            OTHERS                    = 3.
                        IF sy-subrc = 0.
                          <f1> = sl_uzeit.
                        ELSE.
                          text = 'Invalid Time'.
                          sl_status = 1.
                          EXIT.
                        ENDIF.
                      ENDIF.
                    ELSEIF tfield_attr-inttype = 'C'.
                      TRANSLATE f_value TO UPPER CASE.
                      <f1> = f_value.
                    ELSE.
                      TRANSLATE f_value USING ', '.
                      CONDENSE f_value NO-GAPS.
                      TRY.
                          <f1> = f_value.
                        CATCH cx_root INTO ref_ptr.
                          text = ref_ptr->get_text( ).
                          sl_status = 1.
                          EXIT.
                      ENDTRY.
                    ENDIF.
                    SHIFT sline BY tfield_attr-outputlen PLACES.
                    SHIFT sline LEFT.
                  ENDIF.
                  UNASSIGN <f1>.
                ENDLOOP.
                IF sl_status = 0.
                  CASE ss_step.
                    WHEN 1.  "Delete
                      ADD 1 TO d_stat.
                      APPEND <fs_wtab> TO <fs_itd>.
                    WHEN 2.  "Modify
                      ADD 1 TO m_stat.
                      APPEND <fs_wtab> TO <fs_itm>.
                  ENDCASE.
                ENDIF.
              ENDIF.
            ENDDO.
            IF sl_status = 0.
              IF d_stat IS NOT INITIAL.
                slchar = d_stat.
                CONCATENATE 'Deleted -' slchar 'record.' INTO text
                  SEPARATED BY space.
                DELETE (tabname) FROM TABLE <fs_itd>.
              ENDIF.
              IF m_stat IS NOT INITIAL.
                slchar = m_stat.
                CONCATENATE text 'Modified -' slchar 'record.' INTO text
                  SEPARATED BY space.
                MODIFY (tabname) FROM TABLE <fs_itm>.
              ENDIF.
              IF d_stat IS INITIAL AND m_stat IS INITIAL.
                MESSAGE 'No changes were done' TYPE 'S'.
              ELSE.
                MESSAGE text TYPE 'S'.
              ENDIF.
              LEAVE.
            ELSE.
              MESSAGE text TYPE 'I'.
              EXIT.
            ENDIF.
          ELSE.
            LEAVE.
          ENDIF.
      ENDCASE.
    *--END--
    Below is Function for a Dynamic Selection Screen
    FUNCTION zstan_selections.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(TABNAME) LIKE  DD02L-TABNAME DEFAULT 'ZSCARE'
    *"  EXPORTING
    *"     VALUE(DS_CLAUSES) TYPE  RSDS_WHERE
    *"  EXCEPTIONS
    *"      TABLE_NOT_VALID
    *"      OTHER_ERROR
      DATA texpr TYPE rsds_texpr.
      DATA twhere TYPE rsds_twhere.
      DATA trange TYPE rsds_trange.
      DATA BEGIN OF qcat.                    "Selections View for
              INCLUDE STRUCTURE rsdsqcat.    "Free Selectoptions
      DATA END OF qcat.
      DATA BEGIN OF tabs OCCURS 10.
              INCLUDE STRUCTURE rsdstabs.
      DATA END   OF tabs.
      DATA BEGIN OF fields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF fields.
      DATA BEGIN OF efields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF efields.
      DATA selid LIKE rsdynsel-selid.
      DATA actnum LIKE sy-tfill.
      DATA title LIKE sy-title VALUE 'Selection Screen'.
      DATA: maxnum LIKE sy-subrc VALUE '69'.
      CLEAR    tabs.
      tabs-prim_tab = tabname.
      COLLECT  tabs.
      DATA: position LIKE dd03l-position.
      DATA: keyflag  LIKE dd03l-keyflag.
      CLEAR fields.
      fields-tablename = tabname.
      fields-sign      = 'I'.
      DATA: step LIKE sy-subrc.
      SELECT fieldname keyflag position
        INTO (fields-fieldname, keyflag, position)
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
          AND datatype NE 'CLNT'
        ORDER BY position.
        ADD 1 TO step.
        CHECK step LE maxnum.
        IF keyflag <> 'X'.
          efields = fields.
          APPEND efields.
        ENDIF.
        APPEND fields.
      ENDSELECT.
      IF sy-subrc <> 0.
        RAISE table_not_valid.
      ENDIF.
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
        EXPORTING
          expressions              = texpr
          kind                     = 'F'
        IMPORTING
          selection_id             = selid
          expressions              = texpr
          where_clauses            = twhere
          field_ranges             = trange
          number_of_active_fields  = actnum
        TABLES
          tables_tab               = tabs
          fields_tab               = fields
          fields_not_selected      = efields
        EXCEPTIONS
          fields_incomplete        = 01
          fields_no_join           = 02
          field_not_found          = 03
          no_tables                = 04
          table_not_found          = 05
          expression_not_supported = 06
          incorrect_expression     = 07
          illegal_kind             = 08
          area_not_found           = 09
          inconsistent_area        = 10
          kind_f_no_fields_left    = 11
          kind_f_no_fields         = 12
          too_many_fields          = 13.
      IF sy-subrc = 0.
        CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
          EXPORTING
            selection_id            = selid
            title                   = title
          IMPORTING
            where_clauses           = twhere
            expressions             = texpr
            field_ranges            = trange
            number_of_active_fields = actnum
          TABLES
            fields_tab              = fields
          EXCEPTIONS
            internal_error          = 01
            no_action               = 02
            no_fields_selected      = 03
            no_tables_selected      = 04
            selid_not_found         = 05.
        IF sy-subrc = 0.
          CLEAR ds_clauses.
          MOVE tabname TO ds_clauses-tablename.
          READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
          IF sy-subrc <> 0.
            RAISE other_error.
          ENDIF.
        ELSE.
          RAISE other_error.
        ENDIF.
      ELSE.
        RAISE other_error.
      ENDIF.
    ENDFUNCTION.
    Regards,
    Shiva

  • Dynamically Changing stylesheets and images of B2B application

    Hello All,
    We have a requirement to dynamically  change the stylesheets and images of B2B application based on Country  US or UK of the logged-in user.
    On looking into B2B source code, we identified  that stylesheets are defined in init-config.xml , ExtendedInitStyleHandler, BrowserType, ExtendedStyleManager, java classes are used.
    Can  anyone  provide suggestions how this can be achieved?
    Thanks,
    Raj

    What you are trying to achieve is not a simple task. It is better to put some thought and resources to build what yuo need. There is no out-of-the-box way to change the stylesheet dynamically.
    Would it be a feasible option
    No. But technically you can have your own tag with another parameter to specify the country and you can have custom logic to add the right stylesheet.
    The class ExtendedInitStyleHandler initializes the application with the list of stylesheets defined in the init-config.xml and any extensions in the /xcm/customer/modification/initconfig.xml
    It is the tag <isa:stylesheets/> that adds the stylesheet(s) to the JSP and class StyleSheetsTag uses ExtendedStyleManager
    Try this out. Just prior to placing the tag <isa:stylesheets>, use the following class, methods and code in <% Java scriptlet  %>
    public class ExtendedStyleManager;
    public static Iterator getStyles();
    public static void clear(); and
    public static void addStyleSheet(StyleSheet style);
    1. read the current styles (getStyles()),
    2. keep a copy of the safe,
    3. Clear the list (clear()),
    4. Add your country specific stylesheet();
    5. Add rest of the styles you need from the saved list
    6. <isa:stylesheets/>
    It is possible to write a custom tag lib too with the above logic and a country - parameter and use the custom tag in place of the isa tag.

  • Comparing dynamic fields of objects using equals and hashCode methods

    To compare the different objects of the same class with their contents like jobTitleId, classificationId, deptId & classificationId was to be done and do some manipulations later using Set and Map. I was able to do that by simply overriding the equals and hashCode methods of Object class and was able to fetch the information (like in the following Map).
        Map<LocationData, List<LocationData>>
    The following is the class I used (its been shown to you so that it can be referred for my problem statement):
    LocationData class
        package com.astreait.bulkloader;
        public class LocationData {    
            String locId, deptId, jobTitleId, classificationId;
            @Override  
            public boolean equals(Object obj) {        
                LocationData ld = (LocationData)obj;       
                return this.deptId.equals(ld.deptId) && this.jobTitleId.equals(ld.jobTitleId) && this.classificationId.equals(ld.classificationId) &&
        this.locId.equals(ld.locId);   
            @Override  
            public int hashCode() {        
                return deptId.hashCode() + jobTitleId.hashCode() + classificationId.hashCode() +locId.hashCode();  
    Problem:
    I'm already known to which all fields of this object I need to make the comparison.
    i.e I'm bound to use the variables named classificationId, deptId, jobTitleId & locId etc.
    Need:
    I need to customize this logic such that the fields Names (classificationId, deptId, jobTitleId & locId etc) can be pulled dynamically along with their values. So, as far as my understanding I made use of 2 classes (TableClass and ColWithData) such that the List of ColWithData is there in TableClass object.
    I'm thinking what if I override the same two methods `equals() & hashCode();`
    such that the same can be achieved.
        TableClass class #1
        class TableClass{
            List<ColWithData> cwdList;
            @Override
            public boolean equals(Object obj) {
                boolean returnVal = false;
                        // I need to have the logic to be defined such that
                        // all of the dynamic fields can be compared
                return returnVal;
            @Override
            public int hashCode() {
                int returnVal = 0;
                        // I need to have the logic to be defined such that
                        // all of the dynamic fields can be found for their individual hashCodes
                return returnVal;
    ColWithData class #2
        class ColWithData{
            String col; // here the jobTitleId, classificationId, deptId, locId or any other more fields info can come.
            String data; // The corresponding data or value for each jobTitleId, classificationId, deptId, locId or any other more fields.
    Please let me know if I'm proceeding in the right direction or I should make some any other approach. If it is ok to use the current approach then what should be performed in the equals and hashCode methods?
    Finally I need to make the map as: (Its not the concern how I will make, but can be considered as my desired result from this logic)
        Map<TableClass, List<TableClass>> finalMap;

    Hello,
    What is the relation with the Oracle Forms tool ?
    Francois

  • Creating a dynamic query by choosing the field and getting the report

    Hi,
    Is there a way to create a report by allowing the user to choose a field from the table and design a query based on that field.
    Ex In a table students with fields
    (StudentNo, StudentName,Age,Qualification,Hobbies, PlaceofBirth)
    Is it possible to generate a query
    select * from students where Hobbies=programming;
    where the user can be given the option of selecting the field and the value (Hobbies, programming), the query is generated for that, then the report is designed for that query. How could the query be generated?
    Regards,
    Reshma

    You sure can ;)
    Here's an example.
    You can create a JComboBox and have the different categories of hobbies in there and then use ActionListener on the JcomboBox.
    The code will be something like this
    public void actionPerformed(ActionEvent ae)
      if(ae.getSource()==combo)    //assuming the JComboBox object is combo
        String query=new String("");
        String st = combo.getSelectedItem().toString();
        Connection connection=DriverManager.getConnection("jdbc:odbc:DSN","user","password");
        Statement stmt=connection.createStatement();
        String qry="SELECT * FROM tablename WHERE hobby=";
        String query=qry+st;
        ResultSet rs=stmt.execute(query);     //Then do whatever you want with the ResultSet object
    }

Maybe you are looking for

  • What is the diffrence between URL and URI

    Hi all Can any one tell me the difference between URI and URL . I have got a doubt that since somany days what exactly the URI and URL. Can anyone tell with example . Thq

  • Performance end to end testing and comparison between MPLS VPN and VPLS VPN

    Hi, I am student of MSc Network Security and as for my project which is " Comparison between MPLS L3 VPN and VPLS VPN, performance monitoring by end to end testing " I have heard a lot of buzz about VPLS as becoming NGN, I wanted to exppore that and

  • Getting an ntvdm error while using single sign-on

    HI! When I run GssExample from the tutorial, I get an ntvdm error in a requester, saying "Error while setting up environment for the application. Choose 'Close' to terminate the application.". Then I can klick on "Close" or "Ignore". Either way, it t

  • Combobox scrollbar width  and item list padding

    Hello, I am running an application on a touchscreen, and the default combobox is way too small to be used. I have tried skinning the combo box component to make the scrollbar wider, it didn't work. I tried combobox.dropdown.horizontalScrollBar.width

  • Threshold value for creating invoice?

    Hi Does anyone know a way to set a threshold value that has to be meet before an invoice is created in the billing transactions. I would like to set a threshold at about EUR 10 and as long as the customeru2019s total billable amount does not reach th