Add multiple records thorough lov, help of one field?

Hi All:
Actually, I have a datablock with two fields, one is id, other one is name. I select no of records in datablock is 3.My requirement is, there is should be one field on the above of this block.on this block should be lov. suppose that field name is "abc_name", lov delivers value in abc_name and there should be button. when button pressed then value transfer from abc_name to datablock field "name".
when i enter the 2nd value then on pressing button it will transfer on other record of datablock field "name" and so on. Please help me. How it will be done. I am unable to transfer more than one records from "abc_name". to datablock fied "name".Thanks
Ali

I'm sorry, it's not clear to me what you want.
Are you saying that when you select a value from the LOV it should populate ALL the records rather than just the current one?

Similar Messages

  • Add Multiple records to G/L account group.

    Dear ABAP Experts,
    i have requirement that is using  BDC recording file  the Functional People wants to add records to the G/L Account group. The FI consultant gave the recording file, based on the recording file i developed a BDC program. This BDC program will work for single record. After creating single record system will ask for transport request .
    REPORT  ZDP_ACC_GRP.
    TYPES: BEGIN OF TY_TAB,
            KTOPL TYPE KTOPL,
            KTOKS TYPE KTOKS,
            TXT30 TYPE TXT30,
            VONNR TYPE VONNR,
            BISNR TYPE BISNR,
           TRKORR TYPE TRKORR,
       END OF TY_TAB.
    data: lt_tab type table of ty_tab,
           wa_tab type ty_tab.
    data: begin of record,
    * data element: KTOPL
             KTOPL_01_001(004),
    * data element: KTOKS
             KTOKS_01_002(004),
    * data element: TXT30_077T
             TXT30_01_003(030),
    * data element: VONNR_077S
             VONNR_01_004(010),
    * data element: BISNR_077S
             BISNR_01_005(010),
    * data element: TRKORR
             TRKORR_006(020),
           end of record.
    *       Batchinputdata of single transaction
    DATA:   BDCDATA type table of BDCDATA  WITH HEADER LINE.
    *       messages of call transaction
    DATA:   MESSTAB type table of BDCMSGCOLL  WITH HEADER LINE.
    *       error session opened (' ' or 'X')
    DATA:   E_GROUP_OPENED.
    *       message texts
    TABLES: T100.
    data:lv_file type string.
    parameters: p_fname type IBIPPARMS-PATH.
    at selection-screen on value-request for p_fname.
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'P_FNAME'
      IMPORTING
        FILE_NAME           = p_fname .
    start-of-selection.
    lv_file = p_fname.
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         FILENAME                      = LV_FILE
    *   FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
       TABLES
         DATA_TAB                      = LT_TAB
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_READ_ERROR               = 2
        NO_BATCH                      = 3
        GUI_REFUSE_FILETRANSFER       = 4
        INVALID_TYPE                  = 5
        NO_AUTHORITY                  = 6
        UNKNOWN_ERROR                 = 7
        BAD_DATA_FORMAT               = 8
        HEADER_NOT_ALLOWED            = 9
        SEPARATOR_NOT_ALLOWED         = 10
        HEADER_TOO_LONG               = 11
        UNKNOWN_DP_ERROR              = 12
        ACCESS_DENIED                 = 13
        DP_OUT_OF_MEMORY              = 14
        DISK_FULL                     = 15
        DP_TIMEOUT                    = 16
        OTHERS                        = 17  .
    LOop at  lt_tab into wa_tab.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-TXT30(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=NEWL'.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-BISNR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=SAVE'.
    perform bdc_field       using 'V_T077S-KTOPL(01)'
                                   WA_TAB-KTOPL."record-KTOPL_01_001.
    perform bdc_field       using 'V_T077S-KTOKS(01)'
                                   WA_TAB-KTOKS."record-KTOKS_01_002.
    perform bdc_field       using 'V_T077S-TXT30(01)'
                                   WA_TAB-TXT30."record-TXT30_01_003.
    perform bdc_field       using 'V_T077S-VONNR(01)'
                                   WA_TAB-VONNR."record-VONNR_01_004.
    perform bdc_field       using 'V_T077S-BISNR(01)'
                                   WA_TAB-BISNR."record-BISNR_01_005.
    perform bdc_dynpro      using 'SAPLSTRD' '0300'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'KO008-TRKORR'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=LOCK'.
    perform bdc_field       using 'KO008-TRKORR'
                                   WA_TAB-TRKORR."record-TRKORR_006.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-KTOPL(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BACK'.
    perform bdc_dynpro      using 'SAPL0F09' '0020'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'V_T077S-KTOPL(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BACK'.
    perform bdc_transaction using 'OBD4'.
    ENDLOOP.
    FORM BDC_TRANSACTION USING TCODE.
       DATA: L_MSTRING(480).
       DATA: L_SUBRC LIKE SY-SUBRC.
    * batch input session
    * call transaction using
         REFRESH MESSTAB.
         CALL TRANSACTION 'OBD4' USING BDCDATA
                          MODE  'A'" CTUMODE
                          UPDATE 'S'"CUPDATE
                          MESSAGES INTO MESSTAB.
         L_SUBRC = SY-SUBRC.
           LOOP AT MESSTAB.
             SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
                                       AND   ARBGB = MESSTAB-MSGID
                                       AND   MSGNR = MESSTAB-MSGNR.
             IF SY-SUBRC = 0.
               L_MSTRING = T100-TEXT.
               IF L_MSTRING CS '&1'.
                 REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                 REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                 REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                 REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
               ELSE.
                 REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                 REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
               ENDIF.
               CONDENSE L_MSTRING.
               WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
             ELSE.
               WRITE: / MESSTAB.
             ENDIF.
           ENDLOOP.
       REFRESH BDCDATA.
    ENDFORM.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
       CLEAR BDCDATA.
       BDCDATA-PROGRAM  = PROGRAM.
       BDCDATA-DYNPRO   = DYNPRO.
       BDCDATA-DYNBEGIN = 'X'.
       APPEND BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
         CLEAR BDCDATA.
         BDCDATA-FNAM = FNAM.
         BDCDATA-FVAL = FVAL.
         APPEND BDCDATA.
    ENDFORM.
    But the FI consultant wants to add multiple records to 'G/L account group'.After adding records before saving the system need to ask transport request at the last.
    How can I write code ...??
    Please help me.

    Hi Srikanth,
    Thanks for reply,
    You  are right we need to load hierarchy for G/L then we can see all the G/L's for all G/L groups.
    I have one more question when I check in RSA3 for the G/L account numbers, I could not find them.
    I am using the datasource fi_gl_4 and in rsa3 I can see 1000 records data and when I put filter on G/L account and search for the G/L number I needed I cant see it, but it is there in the functional transaction(f.01)?
    How to check for the required G/L's in rsa3 ?
    Thx

  • F4 Help on one field should populate data on another field

    Dear All....
    I am using the FM - F4IF_INT_TABLE_VALUE_REQUEST for F4 help on one field of the selection screen. Based on the selected value, a values corresponding to it should appear on another field.
    My Code -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_svn.
      SELECT qmnum serialnr
        INTO TABLE t_qmel
        FROM qmel
        WHERE qmart  = 'ZD'.
      SORT t_qmel BY qmnum.
    Display the f4 Help Values for SVN
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield     = 'QMNUM'
          dynpprog     = sy-repid
          dynpnr       = sy-dynnr
          dynprofield  = 'P_SVN'
          window_title = text-015
          value_org    = 'S'
        TABLES
          value_tab    = t_qmel
          return_tab   = t_retval.
      READ TABLE t_retval INTO w_retval_wa INDEX 1.
      IF sy-subrc = 0.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = w_retval_wa-fieldval
          IMPORTING
            output = w_qmel_wa-qmnum.
        w_retval_wa-fieldval = w_qmel_wa-qmnum.
        READ TABLE t_qmel INTO w_qmel_wa WITH KEY qmnum = w_retval_wa-fieldval
                                         BINARY SEARCH.
        IF sy-subrc = 0.
          p_esn = w_qmel_wa-serialnr.
        ENDIF.
      ENDIF.
    But this is however not working.
    Please let me know where I am going wrong.
    I have serached SDN thoroghly but could not get my solution.
    Please guide me....
    Regards,
    Pankaj Agarwal.

    *&  AT SELECTION SCREEN ON VALUE-REQUEST FOR FIELD
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ebeln.
      PERFORM f4_hlp_ebeln.
    *&      Form  F4_HLP_EBELN
          text
    -->  p1        text
    <--  p2        text
    FORM f4_hlp_ebeln .
      TYPES: BEGIN OF ty_ebeln,
               ebeln TYPE ebeln ,
            END OF ty_ebeln.
      DATA: lt_ebeln TYPE TABLE OF ty_ebeln.
      CLEAR: lt_ebeln[].
      SELECT ebeln
           FROM zmt_po_mic_ded
             INTO TABLE lt_ebeln.
      IF sy-subrc = 0.
        SORT lt_ebeln[] BY ebeln.
        DELETE ADJACENT DUPLICATES FROM lt_ebeln COMPARING ALL FIELDS.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield         = 'EBELN'
            dynpprog         = sy-repid
            dynpnr           = sy-dynnr
            dynprofield      = 'P_EBELN'
            value_org        = 'S'
            callback_program = sy-repid
          TABLES
            value_tab        = lt_ebeln[]
          EXCEPTIONS
            parameter_error  = 1
            no_values_found  = 2
            OTHERS           = 3.
        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.                    " F4_HLP_EBELN
    DATA: t_dynfields TYPE TABLE OF dynpread,
          t_valhlp    TYPE TABLE OF ty_valhlp.
    DATA: w_dynfields TYPE dynpread.
    CLEAR: t_dynfields[], t_valhlp[].
      DATA: l_ebeln TYPE ebeln.
      w_dynfields-fieldname = 'P_EBELN'.
      w_dynfields-fieldvalue = p_ebeln.
      APPEND w_dynfields TO t_dynfields.
      CLEAR w_dynfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
        TABLES
          dynpfields           = t_dynfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE t_dynfields INTO w_dynfields INDEX 1.
      IF sy-subrc = 0.
        l_ebeln = w_dynfields-fieldvalue.
        SELECT ebeln
               ebelp
               FROM ekpo
               INTO TABLE t_valhlp
               WHERE ebeln = l_ebeln.
        IF sy-subrc = 0.
          SORT t_valhlp[] BY ebeln ebelp.
    here we get the value of ebelp depending on the selection of EBELN ***
        endif.
      ENDIF.

  • Code to sum up multiple record key figure values from one ODS to another OD

    We've got two ODSs: ODS1 and ODS2 and ODS1 feeds data to ODS2 through update rule.  In ODS1, multiple records could contain one same doc records and we would like to sum up a key figure value for these multip records with the same doc number in the update rule and populate a key figure (a sum-up value or total value) in ODS2 for this doc number.  We wonder how the code would look like.
    Welcome the valuable input!
    Thanks

    Hello Kevin,
    In this case there is no need of a code. As in ODS2, contract number is a key and PO is not a part of key, you can have update type for the key figure as "Addition". Value for that particular key figure will be added for all the recordes with same contract number irrespective of PO number.
    Hope it helps.
    Regards,
    Praveen

  • SQL Command returns multiple records, but I see only one record in report

    I work with Crystal Reports XI R2 SP3 and Oracle 10g R2 database.
    I have an SQL Command that returns multiple records. Command name is "CommDivisionNames" and it returns column "CommDivisionNames.DIVISION_NAME". When I place this field into report details section of the report, I can see all 10 records returned and this is how it should be. I actually need this field to be placed in the report header section, and when I place the field there, then I see only the first record. I set that field as "can grow = true". When I do "browse field data" for this field, I see that all 10 records are there, but only the first one is displayed in report header section.
    I thought that I can place SQL Command field anywhere on the report (page header, footer, details) and that it will always show all records that it returns from the database. Can that be done?
    My "main part" of the report returns different set of records, and that's what I have in "report details" section. I need this list of divisions to be in the report header section, so user can see that the report was executed for DivA, DivC, DivE.
    Thank you,
    Milan

    sharonamt:
    Users select divisions from parameter, but the parameter multi values are division_numbers (1,5,10), not division_names. Division_names are visible in parameter_prompt_window as description, but parameter remembers only numbers and I don't know how I can reuse division_names later in formula.
    I do join for division_numbers and make them into one string variable and pass to sub-report, but I think that I can only get these division_names by calling an SQL command or calling stored procedure.
    If I try to do join({MySQLcommand.DIVISION_NAME}) I get error message "A string array is required here".
    Carl:
    I'm playing with cross-tab and I can use it to see all division_names in the report-header section. Since I need them in only one column or only one row, I have to edit cross-tab object and turn all unneeded border lines to white to make them look invisible. So, cross-tab could be a solution for my problem here.
    Another option could be to re-write my SQL command. Since I've read here that SQL command could be written in the same way as I would write a stored procedure, then I could use a bit more complex code to get all multiple division names from the database table into a local cursor, and then use do-while loop to concatenate them into one string, and then to return that string as one record (like 'DivA, DivB, DivC'), and then it should not be a problem to display only that one record/string in report header. It is my understanding that Crystal Reports can call stored procedure that works with many cursors/recordsets and CR will use only the last recordset from the stored procedure. Do you think it could be done this way?
    Thank you,
    Milan

  • Issue while Creating the records in OAF by disabling one field.

    Hi Experts,
    I am having the scenario like this.
    From the OAF page I want to create the record by omitting one field(it is disable for OAF).
    Consider the folowing scenario..
    I am having the following fields Empno,Empname,Salary,Job in the OAF page where I made the Job field alone as disable and the style i am using for job field is message text input and i have set the initial value as 'Manger'.
    I am facing issue while creating the records in OAF page without the job filed value ie 'Manager' then the records were not inserted into my tables. Whereas if I enable the job field in OAF page(meaning I gave the job as 'Manager' in OAF page) I am able to create the records from OAF page and able get inserted in the database.
    Could Anyone can suggest where I fail as it is my Priority issue.
    Any Suggestion will be a great help for me.
    Thanks,
    Murugesh.

    or you can default it in the controller by handling add row event
    if(vo.hasNext())
    vorow = vo.next();
    vorow.setAttribute("xxxx",3838);
    --Prasanna                                                                                                                                                                                                                                                                                                                                   

  • Search help from one field used to populate another on subscreen.

    I have a subscreen with 2 fields;  Plant & Batch.   Search help MCH1F displays batches for plants.  When a batch for a plant is selected in the search help for the batch field, I want to populate the plant field in addition to the batch.  The batch number comes back from the search help selection, but I need to get the plant associated with that batch just selected and populate the subscreen plant field.  SET/GET doesn't work either in the screen field setup or abap flow logic.   Any tips would be appreciated.  Thanks.

    Hi Kurt,
    i think that way its not possible but the closest way is
    i HAVE TWO TABLES
    ZPHY
    ZPROC
    I HAVE SCREEN  IN WHICH I HAVE TO GET VALUE FOR  PHY BASED ON ID.
    AND FOR OTHER FIELD IN THE SCREEN I HAVE PROC BASED ON THE ID I USED TO GET PHY AND  FOR THE SAME ID I AHVE MULTIPLE PROC AND I HAVE SELECT ONE OF THOSE , HERE WHEN YOU PRESS F4 IT WILL GIVE ALL THE PROC ASSOCIATED TO
    ID THATI USED IN THE SELECTION OF PHY.
    AND I THINK YOURS IS THE SAME CASE RIGHT.
    FIRST GET
    process on value-request.
    FIELD zabc-def MODULE VALUE_REQUEST_PHYACT.
    FIELD zabc-proc MODULE VALUE_REQUEST_PROC.
    MODULE VALUE_REQUEST_PHYACT INPUT.
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr.
    CLEAR zabc.
    CLEAR : zabc-def, zabc-id, zabc-proc,
    zabc-ZSHECPROC.
    CLEAR FINAL.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
      EXPORTING
        TABNAME                   = 'ZPHY'
        FIELDNAME                 = 'def'
        SEARCHHELP                = 'ZPHY'
      SHLPPARAM                 = ' '
        DYNPPROG                  = PROGNAME
        DYNPNR                    = DYNNUM
      DYNPROFIELD               = ' '
      STEPL                     = 0
      VALUE                     = ' '
      MULTIPLE_CHOICE           = ' '
      DISPLAY                   = ' '
      SUPPRESS_RECORDLIST       = ' '
      CALLBACK_PROGRAM          = ' '
      CALLBACK_FORM             = ' '
      TABLES
        RETURN_TAB                = IT_RETURN4
    EXCEPTIONS
      FIELD_NOT_FOUND           = 1
      NO_HELP_FOR_FIELD         = 2
      INCONSISTENT_HELP         = 3
      NO_VALUES_FOUND           = 4
      OTHERS                    = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    read table it_return4 index 1.
    zabc-def = it_return4-fieldval.
    select single id into zabc-id FROM ZPHY
                          WHERE def = zabc-def.
    FINAL-def = zabc-def.
    FINAL-id = zabc-id.
    HERE BASED ON ID I AM RETRIEVING  DEF FIELD ,THIS IS FROM SEARCH HELP USING SE11.
    AND FOR THE SAME ID I HAVE TO GET PROC FIELD FROM ANOTHER TABLE
    ENDMODULE.                 " VALUE_REQUEST_PHYACT  INPUT
    MODULE VALUE_REQUEST_PROC INPUT.
    DATA : SERVICE LIKE zabc-id.
    select single id into SERVICE FROM ZPHY
                          WHERE def = zabc-def.
    SELECT * INTO TABLE ITAB_TEST4 FROM ZPROC
                      WHERE id = SERVICE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        RETFIELD               = 'proc'
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'PROCEDURE'
      VALUE                  = ' '
        VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      TABLES
        VALUE_TAB              = ITAB_TEST4
      FIELD_TAB              =
        RETURN_TAB             = IT_RETURN4
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if sy-subrc = 0.
              clear itab_TEST4.
              read table it_return4 index 1.
                   zabc-proc = it_return4-fieldval.
         read table itab_TEST4 with key id = itab_details-def
             itab_zMOR-def = itab_details-def.
             itab_zMOR-zzfname  = itab_details-zzfname.
            endif.
    SELECT SINGLE ZSHECPROC INTO zabc-ZSHECPROC FROM ZPROC
    WHERE proc = zabc-proc.
    FINAL-proc = zabc-proc.
    final-zshecproc = zabc-zshecproc.
    *********AGAIN THIS IS NOT THE SEARCH HELP FROM SE11
    ENDMODULE.                 " VALUE_REQUEST_PROC  INPUT
    hope this helps
    Thanks

  • For Tcodeme51n , there is no F4 help for one field, how can we provide F4 .

    Hi  ABAP Gurus,
    I am Ramu,
    For tcode me51n, there is one field, for that no F4 help. How can we provide F4 help for that particular field.
    Thanks in Advance.

    Hi Ram
    Pls try the below source code.
    Reward pts if help.
    regards
    Deepanker
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Reward pts if help.

  • How to loop and add multiple records from db in .pdf using cfdocument

    I have a query that pulls a users information (Id, FirstName,
    LastName, Title,etc). I then use cfdocument to output a person's
    biography into a pdf. This is great, because we no longer have to
    manually create bios, as they are now all dynamically generated.
    The problem I have now is that we want to be able to select
    multiple users and create a .pdf with each of their bios included
    in the one pdf.
    How do I loop thru records from a sql database in a
    cfdocument that includes a header and footer in cfdocument items,
    and ensure that one persons bio doesn't continue on the page with
    anothers.
    Here's the code I have so far for the cfdocument:

    Put the query around just the body of your cfdocument not
    around the whole cfdocument tag. Also, move any query information
    out of the header and put that in the body of the document. Lastly,
    put a cfdocumentitem pagebreak after each bio...you will need to
    check the recordcount of the query against the row you are on so
    that you don't add an empty page break at the end.

  • Need to add a record in search help

    Hi all,
    I have field in my selection screen with search help.
    serach help contains 4 records  i need to add 5 th record in that search help how can i add that one.
    Thanks,

    check it out may be helpful for u
    Re: how to add a value/entry in a exisiting search help
    check the below link also
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/4d3642eca5033be10000000a1550b0/content.htm
    Regards,
    Naveen

  • Could not show multiple records while could show only one record

    Hi, all
    I have an oracle 10g db running on a Linux E3 server.
    I have two tables:
    CREATE TABLE "IMMUNODATA"."DEMOGRAPHICS" (
    "SUBJECTID" INTEGER NOT NULL,
    "WORKID" INTEGER,
    "OMRFHISTORYNUMBER" INTEGER,
    "OTHERID" INTEGER,
    "BARCODE" INTEGER,
    "GENDER" VARCHAR2(1),
    "DOB" DATE,
    "RACEAI" INTEGER,
    "RACECAUCASIAN" INTEGER,
    "RACEAA" INTEGER,
    "RACEASIAN" INTEGER,
    "RACEPAC" INTEGER,
    "RACEHIS" INTEGER,
    "RACEOTHER" VARCHAR2(50),
    "SSN" VARCHAR2(11),
    PRIMARY KEY("SUBJECTID") VALIDATE
    CREATE TABLE "IMMUNODATA"."MEDICATION" (
    "ID" INTEGER NOT NULL ,
    "THEDATE" DATE ,
    "SUBJECTID" INTEGER NOT NULL,
    "MED_PAGENOTCOMPLETED" VARCHAR2(500) ,
    "MEDICATION_NAME" VARCHAR2(100),
    "MEDICATION_CLASSIFICATION" VARCHAR2(100),
    "MEDICATION_DOSENUM" VARCHAR2(50),
    "MEDICATION_DOSEMEASURE" VARCHAR2(100),
    "MEDICATION_ROUTE" VARCHAR2(100),
    "MEDICATION_FREQ" VARCHAR2(100),
    "MEDICATION_BEGIN" DATE,
    "MEDICATION_END" DATE,
    "BARCODE" INTEGER,
    "DATASOURCE" VARCHAR2(50),
    "NOCHANGE" INTEGER,
    PRIMARY KEY("ID") VALIDATE,
    FOREIGN KEY("SUBJECTID") REFERENCES "IMMUNODATA"."DEMOGRAPHICS" ("SUBJECTID") VALIDATE
    I want to show an output to combine all medication records of one person into one, and I created a function.
    CREATE OR REPLACE FUNCTION COMMEDICATION(p_subjectid IN immunodata.medication.subjectid%TYPE ) RETURN VARCHAR2 IS
    v_medication VARCHAR2(1000);
    BEGIN
    FOR c IN (SELECT THEDATE, MED_PAGENOTCOMPLETED, MEDICATION_NAME, MEDICATION_CLASSIFICATION, MEDICATION_DOSENUM, MEDICATION_DOSEMEASURE,MEDICATION_ROUTE,MEDICATION_FREQ,MEDICATION_BEGIN,MEDICATION_END,DATASOURCE,NOCHANGE FROM immunodata.medication WHERE subjectid = p_subjectid)
    LOOP
    IF v_medication IS NULL THEN
    v_medication := c.THEDATE||' '||c.MED_PAGENOTCOMPLETED||' '||c.MEDICATION_NAME||' '||c.MEDICATION_CLASSIFICATION||' '||c.MEDICATION_DOSENUM||' '||c.MEDICATION_DOSEMEASURE||' '||c.MEDICATION_ROUTE||' '||c.MEDICATION_FREQ||' '||c.MEDICATION_BEGIN||' '||c.MEDICATION_END||' '||c.DATASOURCE||' '||c.NOCHANGE;
    ELSE
    v_medication := v_medication||','||c.THEDATE||' '||c.MED_PAGENOTCOMPLETED||' '||c.MEDICATION_NAME||' '||c.MEDICATION_CLASSIFICATION||' '||c.MEDICATION_DOSENUM||' '||c.MEDICATION_DOSEMEASURE||' '||c.MEDICATION_ROUTE||' '||c.MEDICATION_FREQ||' '||c.MEDICATION_BEGIN||' '||c.MEDICATION_END||' '||c.DATASOURCE||' '||c.NOCHANGE;
    END IF;
    END LOOP;
    RETURN v_medication;
    END;
    and I performed this selection statement:
    SQL> select subjectid, barcode, COMmedication(subjectid) from immunodata.demographics where barcode=500135;
    SUBJECTID BARCODE
    COMMEDICATION(SUBJECTID)
    33 500135
    15-SEP-00 Cyclophosphamide Immunosuppresant .7 MG IV MONTLY FORM1 ,15-SEP-00 Hydroxychloroquine (Plaquenil) Immunosuppresant 400 MG DAILY FORM1
    It is exactly what I need, so I want to show all records in the tables.
    SQL> select subjectid, barcode, COMmedication(subjectid) from immunodata.demographics;
    ERROR:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.COMMEDICATION", line 9
    no rows selected
    It seems that one record could be shown, but multiple could not.
    Is there anything wrong with my code or other things?
    Thanks!
    Qian

    It seems that one record could be shown, but multiple could not.
    Is there anything wrong with my code or other things?
    It means that there is at least one subjectid in your table for which the value of v_medication in the function exceeds 1000 characters.
    You may want to increase the size of v_medication to 4000, which would be the upper limit for the function's return value.
    pratz

  • How to add multiple records in table thru form via Submit button

    Hi all
    i have small requirement as follows.
    i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button.
    now at runtime when i will enter the details in the form and click on the submit button then those record details has been stored in Table. then next time again when i submit the form with details then the table contains all records of current and existing ...so table has to maintain mutile records thru form via submit form..
    i need sample code on the same.
    points are always rewardable
    Thanks
    Sunil

    Hi,
    Create one context attribute and map it to the Inputfiled and one submit button, create a node with a valueattribute map it to a Table and in onActionsubmit write this code
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
        String str=wdContext.currentContextElement().getInputfiledattribute();
        IPrivateTableformView.ITablenodeNode node=wdContext.nodeTablenode();
       IPrivateTableformView.ITablenodeElement ele=node.createTablenodeElement();
       ele.setNodeattribute(str);
       node.addElement(ele);
        //@@end
    thanx,
    ramani.p

  • Multiple records displayed on form at one time- 2 lines for each record

    Hello,
    I have a canvas in which I want to display 8 records at at time, so in the data block I specified 8 as the "number of records displayed" value.
    However, the record has too many fields to display on 1 vertical line, so I want to split the fields into two separate lines, so there will still be 8 records but each in two lines.
    How do I do that?
    I'm using Forms 10g. The block is a database block using FROM CLAUSE QUERY , and the canvas is stacked.
    Thanks

    Sandy,
    You will need to set the "Distance Between Records" property for each item in the Multi-Record Block. This will increase the space between rows so you can stack them into two rows. Unfortunately, you can't set this property at the block - so you have to set it for each displayed item.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Dynamic search help for one field of the SM30 generated maintenance view

    Hi experts,
    I have one Z* table with three fields. For that table I have generated maintenance dialog in SE55 so I can now run the maintenance in SM30. My requirement is: as soon as a user enters a value for the first field, the search help for the second field should be depended on the value in the first field. Let's say when user entered value 01 into the first field then the search help for the second field should be S_HLP01. For other values entered into the first screen the search help for the second field should be S_HLP02. Both search helps are standard (the names differ).
    Is there any change how to achieve this without making completely new dynpro transaction?

    Hi ,
    You can try it this way.
    pass your match-code( search help to function ) HELP_VALUES_GET_WITH_MATCHCODE and get the value and update it in  your screen field.
    But you have to modify the flow logic in POV event. it would be better if you create your own transaction because once the maintenance is regenerated your modified flow logic will vanish

  • F4 help for one field in modulepool program..(Possible values)

    Hello Experts,
    I have 3 fields in my module pool screen.
    PLANT, MATERIALNO AND STORAGELOCATION.
    BASED ON PLANT AND MATERIAL I NEED TO PROVIDE F4 HELP FOR STORAGE LOCATION(LGORT).
    How can i write the code in PROCESS ON VALUE REQUEST ..
    AND WHICH FUNCTION MODULE SHOULD BE USED.
    Please can anybody send me the code asap.
    I will give u full points if ur code matches my requirement.

    Hi Raja,
               i will send a sample code for ur problem check in once..In that code i explicitly hardcoded the values for serchhelp.Instead of that we have to use select statement based on ur condition and place them in internal table ok.
    FUNCTION MODULE:
    F4IF_INT_TABLE_VALUE_REQUEST.
    CODE:
    *& Report  YSEARCHHELP                                                 *
    *& DEVELOPER   : KIRAN KUMAR.G.A                                       *
    *& PURPOSE     : DEMO ON SEARCH HELP                                   *
    *& CREATION DT : 27/12/2007                                            *
    *& REQUEST     : ERPK900035                                            *
    REPORT  YSEARCHHELP.
    INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
    data: begin of t_itab occurs 0,
            name(10) type c,
          end of t_itab.
    *FIELDNAME AND TAB NAME FOR THE SELECTION
    DATA :field_tab LIKE dfies  OCCURS 0 WITH HEADER LINE.
    *THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    *START THE SELECTION SCREEN BLOCK
    selection-screen begin of block ss1 with frame.
    parameters: p_name1(10) type c.
    selection-screen end of block ss1.
    *& F4 Help for p_name1                                                 *
    at selection-screen on value-request for p_name1.
    *CLEAR ALL EXISTING DATA
    *TO BE DONE EVERYTIME F4 HELP IS REQUESTED
    REFRESH t_itab.
    REFRESH field_tab.
      field_tab-fieldname = 'ERNAM'.
      field_tab-tabname = 'VBAK'.
    APPEND field_tab.
    t_itab-name = 'Andrews'.
    append t_itab.
    t_itab-name = 'Jennie'.
    append t_itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = field_tab-fieldname
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'Select name'
      VALUE                  = ' '
      VALUE_ORG              = 'C'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
       value_tab              = t_itab
       FIELD_TAB              = field_tab
       RETURN_TAB             = return_tab
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    p_name1 = return_tab-fieldval.
    ENDIF.
    Award points if helpful.
    Kiran Kumar.G
                    Have a Nice Day..

Maybe you are looking for

  • Airport utility doesn't show the correct information

    Hi - I am trying to get Airport Utility to work on my iMac (3.4 GHz Intel core i7, OS 10.8.4) but it does not show the correct information about my network. On my iMac, the utility consistently shows my Airport extreme and three Airport express as "D

  • I bought a Mac a week ago. How do I get the new iWork for free?

    The title explains it all. I bought the new 13" MacBook air in a retail store last week, and when I tried to download the apps from the Mac App Store, they cost money. How do I get them for free?

  • How to optimise an SELECT

    Hi guys, I have to develop a procedure which will update a column ( im_column_to_be_updt ) into a big_table The structure of the table: big_table (462611506 records) CREATE TABLE big_table im_cod_banca         VARCHAR2(05), im_dta_rif           DATE,

  • Find if Microsoft Office installed programmatically

    Hi,     Is there a way to find if Microsoft Office is installed on  the computer programmatically? I need to generate different format of report depends on if Word and Excel is installed or not.     Thanks!     Regards,    Tom Solved! Go to Solution.

  • SQL_Latin1_General_CP850_BIN2

    Hi, Any ideas/suggestions ? We are in a dev/qa/production landscape (R/3 470-200)and need to convert to SQL_Latin1_General_CP850_BIN2 before upgrading to SQL Server 2005. Firstly, are we able to do this progressively without affecting the transport q