Query related to alv grid and sap script

Hi All,
I have a requirement where i should read the values which are selected on the alv grid list output and those values i need to display on the script(layout).
Help me out guru's its an urgency...
thanks in advance .
regards
ravi ganji

Hi Ravi,
I have done it exactly like your requirement. This program contains ALV and Smartform.
But whatever may be, both are layouts and having driver program. So just finish your driver program and Script layout and then use this program.
I have written this code to print contact letters from VA42. So, modify this code to insert your transaction code.
Let me know if you have any questions.
Here is the code.
REPORT ILETTER MESSAGE-ID CM.
TYPE POOLS (ALV)
  TYPE-POOLS:
            slis.
Customized Types
  TYPES:
        BEGIN OF ty_cntrt,
          box(1)   TYPE c,
          kunnr    TYPE kunag,
          vbeln    TYPE vbeln_va,
          vbeln1   TYPE vbeln_va,
          vposn    TYPE posnr,
          vuntdat  TYPE vudat_veda,
          vbegdat  TYPE vbdat_veda,
          vdemdat  TYPE vddat_veda,
          venddat  TYPE vndat_veda,
        END   OF ty_cntrt,
      single line TYPES
        BEGIN OF ty_vkorg,
         vkorg    TYPE vkorg,
        END   OF ty_vkorg.
Constants
  CONSTANTS:
     c_sform  TYPE char10             VALUE 'SMARTFORMS',
     c_tcode  TYPE sy-tcode           VALUE 'VA42',
     c_mode   TYPE c                  VALUE 'N',
     c_updat  TYPE c                  VALUE 'A',
     c_batch  TYPE sy-callr           VALUE 'BATCH',
     c_dclick TYPE char10             VALUE '&IC1'.
Internal tables
  DATA: it_cntrt TYPE TABLE OF ty_cntrt,
        it_bdc   TYPE TABLE OF bdcdata,
        it_mesg  TYPE TABLE OF bdcmsgcoll,
        it_const TYPE TABLE OF /SIE/SSG_XCM_CUC,
        it_vkorg TYPE TABLE OF ty_vkorg.
Work areas
  DATA: wa_cntrt TYPE ty_cntrt,
        wa_bdc   TYPE bdcdata,
        wa_const TYPE /SIE/SSG_XCM_CUC,
        w_vbak   TYPE vbak,
        w_veda   TYPE veda,
        w_xcm_pr TYPE /sie/ssg_xcm_pr,
        w_vkorg  TYPE ty_vkorg.
Variables
  DATA: l_repid    TYPE sy-repid,
        l_vakey    TYPE vakey,
        l_variant  TYPE varid-variant,
        l_vbeln    TYPE i,
        l_vkorg    TYPE i,
        l_vkbur    TYPE i,
        l_vkgrp    TYPE i,
        l_ckappl(40)   TYPE c,
        l_ckschl(40)   TYPE c,
        l_cauart(40)   TYPE c.
Program Constants
  DATA: c_kappl    TYPE kappl,
        c_kschl    TYPE kschl,
        c_auart    TYPE auart,
        c_repco    TYPE /sie/ssg_xcm_const,
        c_value    TYPE /sie/ssg_xcm_value.
ALV data declarations
  DATA:
      gt_fieldcat  TYPE slis_t_fieldcat_alv,
      gt_tab_group TYPE slis_t_sp_group_alv,
      gs_layout    TYPE slis_layout_alv,
      gs_repid     TYPE sy-repid,
      gs_sort      TYPE TABLE OF slis_sortinfo_alv.
Selection screen
  SELECTION-SCREEN BEGIN OF BLOCK indletter WITH FRAME TITLE text-001.
  skip one line
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS:
                 contract
                   so_vbeln FOR w_vbak-vbeln,
                 category
                   so_auart FOR w_vbak-auart NO-DISPLAY,
                 Sales Org
                   so_vkorg FOR w_vbak-vkorg OBLIGATORY,
                 Dis Channel
                   so_vtweg FOR w_vbak-vtweg,
                 Division
                   so_spart FOR w_vbak-spart,
                 Sales Group
                   so_vkgrp FOR w_vbak-vkgrp,
                 Sales Office
                   so_vkbur FOR w_vbak-vkbur OBLIGATORY,
                 Cancellation Procedure
                   so_vkues FOR w_veda-vkuesch OBLIGATORY,
                 Contract Signed Date
                   so_vuntd FOR w_veda-vuntdat,
                 created by
                   so_ernam FOR w_vbak-ernam,
                 Fixed Indexation formula
                   so_fnum  FOR w_xcm_pr-fnum OBLIGATORY.
  skip one line
    SELECTION-SCREEN SKIP.
  Indexation letter
    PARAMETERS: rb_index  RADIOBUTTON GROUP radi USER-COMMAND usr.
  Follow up report
    PARAMETERS: rb_follo  RADIOBUTTON GROUP radi.
  skip one line
    SELECTION-SCREEN SKIP.
  Manual processing checkbox
    PARAMETERS:    p_manpr AS CHECKBOX.
  SELECTION-SCREEN END   OF BLOCK indletter.
Printer block
  SELECTION-SCREEN BEGIN OF BLOCK blk_par WITH FRAME TITLE text-002.
  Printer
    PARAMETERS:     p_print  LIKE nast-ldest DEFAULT 'LOCL' OBLIGATORY.
  SELECTION-SCREEN END OF BLOCK blk_par.
User selection data validation
  AT SELECTION-SCREEN ON so_vkorg.
Ragne for sales org
  RANGES: r_vkorg FOR vbak-vkorg.
  REFRESH: it_const, r_vkorg.
  CLEAR   wa_const.
Proceed for execution only for Sales Orgs in /SIE/SSG_XCM_CUC
  LOOP AT so_vkorg.
   r_vkorg-sign = 'I'.
   r_vkorg-option = 'EQ'.
   r_vkorg-low    = so_vkorg-low.
   APPEND r_vkorg.
Check Sales Org intervals entered in the selection screen
   IF NOT so_vkorg-high IS INITIAL.
Get all Sales Org for interval
     SELECT vkorg FROM tvko INTO TABLE it_vkorg
       WHERE vkorg BETWEEN so_vkorg-low AND so_vkorg-high.
     IF sy-subrc = 0.
     Add all Sales org into one internal table
       LOOP AT it_vkorg INTO w_vkorg.
         r_vkorg-low = w_vkorg-vkorg.
         APPEND r_vkorg.
         CLEAR: w_vkorg.
       ENDLOOP.
     delete repeated records
       DELETE ADJACENT DUPLICATES FROM r_vkorg COMPARING low.
     ENDIF.
   ENDIF.
   CLEAR r_vkorg.
  ENDLOOP.
Get Sales Org entries maintained in /SIE/SSG_XCM_CUC
  l_repid = sy-repid.
Check Sales Org is maintained for Renewal Letter?
  LOOP AT r_vkorg.
  concatenate constant with Sales Org
    CONCATENATE 'INX_LETTER_CREATE_' r_vkorg-low INTO c_repco.
  Get constant
    SELECT SINGLE value
      FROM /sie/ssg_xcm_cuc
      INTO c_value
     WHERE repid = l_repid
       AND const = c_repco
       AND vkorg EQ so_vkorg-low.
  Check alerady maintained?
    IF sy-subrc <> 0 OR
      ( sy-subrc = 0 AND c_value <> 'X' ).
    Issue massage 'Sales Org no permitted for renewal Letter'.
      MESSAGE E012.
      CLEAR: c_repco, r_vkorg.
      EXIT.
    ENDIF.
    CLEAR: c_repco, r_vkorg.
  ENDLOOP.
  AT SELECTION-SCREEN.
Read single Sales Org
   READ TABLE so_vkorg INDEX 1.
   IF sy-subrc = 0.
     CLEAR: l_ckappl, l_ckschl, l_cauart, c_kappl, c_kschl, c_auart.
   for application
     CONCATENATE 'INX_LETTER_V1_' so_vkorg-low INTO l_ckappl.
   for output type
     CONCATENATE 'INX_LETTER_Y6C4_' so_vkorg-low INTO l_ckschl.
   document type
     CONCATENATE 'INX_LETTER_AUART_' so_vkorg-low INTO l_cauart.
   Get application
     SELECT SINGLE value FROM /sie/ssg_xcm_cuc
       INTO c_kappl WHERE repid = sy-repid AND const LIKE l_ckappl.
   Get output type
     SELECT SINGLE value FROM /sie/ssg_xcm_cuc
       INTO c_kschl WHERE repid = sy-repid AND const LIKE l_ckschl.
   Get document type
     SELECT SINGLE value FROM /sie/ssg_xcm_cuc
       INTO c_auart WHERE repid = sy-repid AND const LIKE l_cauart.
   ENDIF.
find no of Sales org entries entered in the selection screen
   DESCRIBE TABLE so_vkorg LINES l_vkorg.
find no of Sales office entries entered in the selection screen
   DESCRIBE TABLE so_vkbur LINES l_vkbur.
find no of Sales Group entries entered in the selection screen
   DESCRIBE TABLE so_vkgrp LINES l_vkgrp.
Check if enterred more than one entry
   IF l_vkorg = 1 AND l_vkbur = 1.
     add Sales Org, Sales office, Sales group for key
     IF NOT so_vkgrp[] IS INITIAL.
       CONCATENATE so_vkorg-low so_vkbur-low so_vkgrp-low INTO l_vakey.
     ELSE.
       CONCATENATE so_vkorg-low so_vkbur-low '%' INTO l_vakey.
     ENDIF.
     CONDENSE l_vakey.
   Get printer name for selection.
     SELECT SINGLE ldest FROM nach INTO p_print
      WHERE kappl = c_kappl AND kschl = c_kschl AND vakey LIKE l_vakey.
   ENDIF.
Manual processing is possible for Renewal Letter in advance only
  IF p_manpr = 'X' AND rb_follo = 'X'.
    MESSAGE E017.
  ENDIF.
Main Processing
START-OF-SELECTION.
  Check for the Follow up report
    IF rb_follo = 'X'.
    Call Follow up report with Selection criteria
      SUBMIT /SIE/SWE_XCM_INDEX_FOLLOWUP
       USING SELECTION-SET l_variant
        WITH so_vbeln IN so_vbeln
        WITH so_vkorg IN so_vkorg
        WITH so_vtweg IN so_vtweg
        WITH so_spart IN so_spart
        WITH so_vkgrp IN so_vkgrp
        WITH so_vkbur IN so_vkbur
        WITH so_vkues IN so_vkues
        WITH so_vuntd IN so_vuntd
        WITH so_ernam IN so_ernam
        WITH so_fnum  IN so_fnum
        WITH p_kappl  EQ c_kappl
        WITH p_kschl  EQ c_kschl
        WITH p_auart  EQ c_auart
      AND RETURN.
    ELSE.
    Process for Indexation Report
      gs_repid = sy-repid.
    Get data.
      PERFORM get_data.
    Filter data based on Siemens France rules
      PERFORM process_data.
    Check contract data is available for selection criteria
      IF NOT it_cntrt[] IS INITIAL.
      create ALV output header
        PERFORM alv_fieldcat USING gt_fieldcat[].
      create ALV layout
        PERFORM alv_layout CHANGING gs_layout.
      Sort ALV output
        PERFORM alv_sort.
      display filtered contract data
        PERFORM output_data.
      ELSE.
      Display a message 'No records found'.
        MESSAGE I011.
        EXIT.
      ENDIF.
    ENDIF.
*&      Form  get_data
      Retrieve contracts data from tables
-->  p1        text
<--  p2        text
FORM get_data.
Get contract data from VBAK and VEDA.
  SELECT avbeln   aaudat   a~kunnr
         bvuntdat bvbegdat
         bvdemdat bvenddat
    INTO CORRESPONDING FIELDS OF TABLE it_cntrt
    FROM vbak AS a INNER JOIN veda AS b
      ON avbeln = bvbeln
   WHERE a~vbeln   IN so_vbeln
     AND a~auart   EQ c_auart
     AND a~vkorg   IN so_vkorg
     AND a~vtweg   IN so_vtweg
     AND a~spart   IN so_spart
     AND a~vkgrp   IN so_vkgrp
     AND a~vkbur   IN so_vkbur
     AND a~ernam   IN so_ernam
     AND b~vposn   = '000000'
     AND b~vkuesch IN so_vkues
     AND b~vuntdat IN so_vuntd.
ENDFORM.                    " get_data
*&      Form  process_data
      text
-->  p1        text
<--  p2        text
FORM process_data.
Internal tables
  DATA: l_nast   TYPE TABLE OF nast,
        it_pr    TYPE TABLE OF /sie/ssg_xcm_pr.
Work areas
  DATA: w_nast   TYPE nast,
        wa_pr    TYPE /sie/ssg_xcm_pr.
local Variables
  DATA: l_datum1 TYPE sy-datum,
        l_datum2 TYPE sy-datum,
        l_d3last TYPE sy-datum,
        l_d3next TYPE sy-datum.
current date.
  l_datum1 = sy-datum.
Calcuate date after 3 months.
  CALL FUNCTION 'DATE_CREATE'
    EXPORTING
      ANZAHL_MONATE        = 3
      DATUM_EIN            = l_datum1
    IMPORTING
      DATUM_AUS            = l_datum2.
  l_datum2 = l_datum2 - 1.
  SORT it_cntrt BY KUNNR VBELN.
Get corresponding records from /SIE/SSG_XCM_PR.
  SELECT vbeln posnr fnum
      FROM /SIE/SSG_XCM_PR
      INTO CORRESPONDING FIELDS OF TABLE it_pr
       FOR ALL ENTRIES IN it_cntrt
     WHERE vbeln = it_cntrt-vbeln
      AND posnr = it_cntrt-vposn
       AND fnum IN so_fnum.
clear workarea
  CLEAR wa_cntrt.
filter contracts agaist the table /SIE/SSG_XCM_PR records.
  LOOP AT it_cntrt INTO wa_cntrt.
    CLEAR wa_pr.
  check contracts available in table /SIE/SSG_XCM_PR
    READ TABLE it_pr INTO wa_pr WITH KEY vbeln = wa_cntrt-vbeln.
    IF sy-subrc <> 0.
        DELETE it_cntrt.
        CLEAR wa_pr.
        CONTINUE.
    ELSEIF sy-subrc = 0 AND NOT wa_pr-fnum IN so_fnum.
  if not available, do not consider this contract
        DELETE it_cntrt.
        CLEAR wa_pr.
        CONTINUE.
    ENDIF.
     Dont consider contracts expires before today and after 3 months.
    IF wa_cntrt-vdemdat > l_datum1.   "current date
           IF wa_cntrt-vdemdat(6) > l_datum2(6). "AND   "after 3 months
           delete contract
             DELETE it_cntrt.
             CLEAR wa_cntrt.
             CONTINUE.
           ENDIF.
    ELSE.
        DELETE it_cntrt.
        CLEAR wa_cntrt.
        CONTINUE.
    ENDIF.
  Is contract renewal letter has been sent already?
  Get all records from NAST to find letter sent?
    SELECT kappl objky kschl nacha datvr
      FROM NAST
      INTO CORRESPONDING FIELDS OF TABLE l_nast
     WHERE kappl = c_kappl
       AND objky = wa_cntrt-vbeln
       AND kschl = c_kschl
       AND nacha = '1'.
    IF sy-subrc = 0.
       sort renewal letter sent dates by latest is first
         SORT l_nast BY datvr DESCENDING.
       Get latest nast record
         READ TABLE l_nast INTO w_nast INDEX 1.
         IF sy-subrc = 0.
            IF p_manpr <> 'X'.  " ignore 3 month logic
                l_d3next = wa_cntrt-vdemdat(06).
                l_d3next+6(2) = '01'.
              Calcuate date after 3 months.
                CALL FUNCTION 'DATE_CREATE'
                  EXPORTING
                    ANZAHL_MONATE        = -3
                    DATUM_EIN            = l_d3next
                  IMPORTING
                    DATUM_AUS            = l_d3last.
                l_d3last = l_d3last + 1.
              Check letter already sent year equals current year
                IF w_nast-datvr BETWEEN l_d3last AND wa_cntrt-vdemdat.
                 do not consider it
                   DELETE it_cntrt.
                   CLEAR: l_d3last, wa_cntrt, w_nast, l_d3next.
                   CONTINUE.
                ENDIF.
            ENDIF.
         ENDIF.
    ENDIF.
  no leading zeros to contract
    WRITE wa_cntrt-vbeln TO wa_cntrt-vbeln1 NO-ZERO.
  modify internal table
    MODIFY it_cntrt FROM wa_cntrt.
    CLEAR: l_nast, w_nast.
  ENDLOOP.
ENDFORM.                    " process_data
*&      Form  output_data
      text
-->  p1        text
<--  p2        text
FORM output_data.
Display output in a ALV Grid
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = gs_repid
       I_CALLBACK_PF_STATUS_SET          = 'ALV_STATUS'
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
       IS_LAYOUT                         = gs_layout
       IT_FIELDCAT                       = gt_fieldcat
       IT_SORT                           = gs_sort
       I_SAVE                            = 'A'
     TABLES
       T_OUTTAB                          = it_cntrt
     EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
   IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   ENDIF.
ENDFORM.                    " output_data
*&      Form  alv_header
      text
-->  p1        text
<--  p2        text
FORM alv_fieldcat USING gs_fieldcat TYPE slis_t_fieldcat_alv.
  DATA: ls_fieldcat TYPE slis_fieldcat_alv.
Sold-to Party header
  ls_fieldcat-col_pos = 1.
  ls_fieldcat-fieldname = 'KUNNR'.
  ls_fieldcat-seltext_m = 'Sold-to Party'.
  ls_fieldcat-outputlen = 14.
  ls_fieldcat-datatype  = 'CHAR'.
  ls_fieldcat-key       = 'X'.
  APPEND ls_fieldcat TO gs_fieldcat.
  CLEAR ls_fieldcat.
Contract number
  ls_fieldcat-col_pos = 2.
  ls_fieldcat-fieldname = 'VBELN'.
  ls_fieldcat-seltext_m = 'Contract Number'.
  ls_fieldcat-outputlen = 20.
  ls_fieldcat-datatype  = 'CHAR'.
  APPEND ls_fieldcat TO gs_fieldcat.
  CLEAR ls_fieldcat.
Contract Signed Date
  ls_fieldcat-col_pos = 3.
  ls_fieldcat-fieldname = 'VUNTDAT'.
  ls_fieldcat-seltext_m = 'Contract signed date'.
  ls_fieldcat-outputlen = 20.
  ls_fieldcat-datatype  = 'DATS'.
  APPEND ls_fieldcat TO gs_fieldcat.
  CLEAR ls_fieldcat.
Contract Start Date
  ls_fieldcat-col_pos = 4.
  ls_fieldcat-fieldname = 'VBEGDAT'.
  ls_fieldcat-seltext_m = 'Contract start date'.
  ls_fieldcat-outputlen = '20'.
  ls_fieldcat-datatype  = 'DATS'.
  APPEND ls_fieldcat TO gs_fieldcat.
  CLEAR ls_fieldcat.
Dismantling date
  ls_fieldcat-col_pos = 5.
  ls_fieldcat-fieldname = 'VDEMDAT'.
  ls_fieldcat-seltext_m = 'Dismantling date'.
  ls_fieldcat-outputlen = 14.
  ls_fieldcat-datatype  = 'DATS'.
  APPEND ls_fieldcat TO gs_fieldcat.
  CLEAR ls_fieldcat.
ENDFORM.                    " alv_header
*&      Form  alv_layout
      text
-->  p1        text
<--  p2        text
FORM alv_layout USING ls_layout TYPE slis_layout_alv.
No input
  ls_layout-no_input          = 'X'.
Column width is flexible
ls_layout-colwidth_optimize = 'X'.
  ls_layout-box_fieldname = 'BOX'.
  ls_layout-info_fieldname = 'LINE_COLOR'.
  ls_layout-zebra = 'X'.
  ls_layout-get_selinfos = 'X'.
  ls_layout-reprep = 'X'.
ENDFORM.                    " alv_layout
*&      Form  alv_status
      text
-->  p1        text
<--  p2        text
FORM alv_status USING rt_extab TYPE slis_t_extab.
GUI Status and Application Toolbar
  SET PF-STATUS '/SIE/SWE_XCM_INDEXLE'.
ENDFORM.
*&      Form  user_command
      text
-->  p1        text
<--  p2        text
FORM user_command USING l_ucomm      LIKE sy-ucomm
                        l_selfield   TYPE slis_selfield.
  RANGES: r_kappl FOR nast-kappl,
          r_objky FOR nast-objky,
          r_kschl FOR nast-kschl,
          r_nacha FOR nast-nacha.
  DATA: l_jobname  TYPE TBTCJOB-JOBNAME,
        l_jobcount TYPE TBTCJOB-JOBCOUNT,
        l_repid    TYPE sy-repid,
        l_print_params TYPE PRI_PARAMS,
        l_arc_params   TYPE ARC_PARAMS,
        l_valid        TYPE c,
        l_retcode      TYPE sy-subrc,
        l_blines       TYPE i.
  CASE l_ucomm.
  Process button seleted
    WHEN c_sform.
    process selected records.
      LOOP AT it_cntrt INTO wa_cntrt.
         IF wa_cntrt-box = 'X'.
          place output type in the contract
            PERFORM bdc_output USING wa_cntrt
                               CHANGING l_retcode.
            IF l_retcode = 0.
            add record for jobground job
              r_objky-sign   = 'I'.
              r_objky-option = 'EQ'.
              r_objky-low    = wa_cntrt-vbeln.
              APPEND r_objky.
            ENDIF.
            CLEAR: wa_cntrt, l_retcode, r_objky.
         ENDIF.
      ENDLOOP.
    WHEN c_dclick.
    set contract number id with the selected contract
      SET PARAMETER ID 'AUN' FIELD l_selfield-value.
      SET PARAMETER ID 'KTN' FIELD l_selfield-value.
    call va42 tcode when double click on contract
      CALL TRANSACTION c_tcode AND SKIP FIRST SCREEN.
  ENDCASE.
  DESCRIBE TABLE r_objky LINES l_blines.
IF NOT r_objky[] IS INITIAL.
  IF l_blines > 0.
    Background job name.
      CONCATENATE 'XCM_INDEXATION' sy-uname '_' sy-uzeit
             INTO l_jobname.
    Application
      r_kappl-sign   = 'I'.
      r_kappl-option = 'EQ'.
      r_kappl-low    = 'V1'.
      APPEND r_kappl.
    Message Type
      r_kschl-sign   = 'I'.
      r_kschl-option = 'EQ'.
      r_kschl-low    = c_kschl.
      APPEND r_kschl.
    Message transmission medium
      r_nacha-sign   = 'I'.
      r_nacha-option = 'EQ'.
      r_nacha-low    = '1'.
      APPEND r_nacha.
      l_repid = sy-repid.
    Print Parameters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          DESTINATION                  = p_print
          MODE                         = c_batch
          NO_DIALOG                    = 'X'
          REPORT                       = l_repid
          EXPIRATION                   = 2
          IMMEDIATELY                  = 'X'
          NEW_LIST_ID                  = 'X'
        IMPORTING
          OUT_ARCHIVE_PARAMETERS       = l_arc_params
          OUT_PARAMETERS               = l_print_params
          VALID                        = l_valid
        EXCEPTIONS
          ARCHIVE_INFO_NOT_FOUND       = 1
          INVALID_PRINT_PARAMS         = 2
          INVALID_ARCHIVE_PARAMS       = 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.
    opening the job
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          JOBNAME                = l_jobname
        IMPORTING
          JOBCOUNT               = l_jobcount
       EXCEPTIONS
         CANT_CREATE_JOB        = 1
         INVALID_JOB_DATA       = 2
         JOBNAME_MISSING        = 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.
    Job submit
      SUBMIT /sie/swe_xcm_index_rsnast00 TO SAP-SPOOL
                      USER sy-uname
                      WITH s_kappl IN r_kappl
                      WITH s_objky IN r_objky
                      WITH s_kschl IN r_kschl
                      WITH s_nacha IN r_nacha
                      WITH p_print  EQ p_print
         VIA JOB l_jobname NUMBER l_jobcount
         SPOOL PARAMETERS l_print_params
         WITHOUT SPOOL DYNPRO
         AND RETURN.
      IF sy-subrc <> 0.
      display message when error in scheduling background job
        MESSAGE E016 WITH 'Error scheduling Job'.
      ENDIF.
    Job close
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          JOBCOUNT                          = l_jobcount
          JOBNAME                           = l_jobname
          STRTIMMED                         = 'X'
       EXCEPTIONS
         CANT_START_IMMEDIATE              = 1
         INVALID_STARTDATE                 = 2
         JOBNAME_MISSING                   = 3
         JOB_CLOSE_FAILED                  = 4
         JOB_NOSTEPS                       = 5
         JOB_NOTEX                         = 6
         LOCK_FAILED                       = 7
         OTHERS                            = 8.
      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.
*&      Form  bdc_output
      text
-->  p1        text
<--  p2        text
FORM bdc_output USING    wa_cntrt  TYPE ty_cntrt
                CHANGING l_retcode TYPE sy-subrc.
DATA: l_nast TYPE TABLE OF nast,
       it_nast TYPE TABLE OF nast,
       w_nast TYPE nast,
       l_cellno(2) TYPE n,
       l_vbelv TYPE vbfa-vbelv,
       l_vbpa  TYPE vbpa,
       l_yes(1),
       l_temp(40) TYPE c,
       l_lines    TYPE i,
       l_lesscnt  TYPE i,
       l_less(1),
       l_lines1(2) TYPE n.
    REFRESH: it_nast, l_nast, it_bdc.
    CLEAR: l_nast, w_nast, l_yes, l_cellno,
           it_nast, l_nast, it_bdc.
    PERFORM dyn_scr USING 'SAPMV45A' '0102' 'X'.
      PERFORM dyn_fld USING 'VBAK-VBELN' wa_cntrt-vbeln.
      PERFORM dyn_fld USING 'BDC_OKCODE' '/00'.
    PERFORM dyn_scr USING 'SAPMV45A' '4001' 'X'.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=HEAD'.
    PERFORM dyn_scr USING 'SAPMV45A' '4002' 'X'.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=KDOK'.
    SELECT *
      FROM nast
      INTO CORRESPONDING FIELDS OF TABLE l_nast
     WHERE kappl = c_kappl
       AND objky = wa_cntrt-vbeln.
    IF sy-subrc = 0.
        SORT l_nast BY kschl vstat.
        DESCRIBE TABLE l_nast LINES l_lines.
        LOOP AT l_nast INTO w_nast.
            l_cellno = sy-tabix.
            IF w_nast-kschl = c_kschl AND w_nast-vstat = 0.
              EXIT.
            ENDIF.
            IF w_nast-kschl > c_kschl OR
               ( w_nast-kschl = c_kschl AND w_nast-vstat <> 0 ).
               IF l_less = space.
                 l_cellno = l_cellno - 1.
               ENDIF.
               CLEAR l_less.
              IF l_cellno = 0.
                 l_cellno = 1.
              ENDIF.
              l_lines = l_lines + 1.
              l_lines1 = l_lines.
              PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
                CONCATENATE 'DNAST-KSCHL(' l_lines1 ')' INTO l_temp.
                CONDENSE l_temp.
                PERFORM dyn_fld USING l_temp 'Y6C4'.
                CLEAR: l_temp, l_lines, l_lines1.
                PERFORM dyn_fld USING 'BDC_OKCODE' '/00'.
              EXIT.
            ELSEIF w_nast-kschl < c_kschl.
              l_less = 'X'.
              l_lesscnt = l_lesscnt + 1.
            ENDIF.
        ENDLOOP.
    ELSE.
        l_cellno = '01'.
        PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
          CONCATENATE 'DNAST-KSCHL(' l_cellno ')' INTO l_temp.
          CONDENSE l_temp.
          PERFORM dyn_fld USING l_temp 'Y6C4'.
          CLEAR l_temp.
          PERFORM dyn_fld USING 'BDC_OKCODE' '/00'.
    ENDIF.
    IF l_less = 'X'.
        l_lesscnt = l_lesscnt + 1.
              l_cellno = l_lesscnt.
              l_lines = l_lines + 1.
              l_lines1 = l_lines.
              PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
                CONCATENATE 'DNAST-KSCHL(' l_lines1 ')' INTO l_temp.
                CONDENSE l_temp.
                PERFORM dyn_fld USING l_temp 'Y6C4'.
                CLEAR: l_temp, l_lines, l_lines1.
                PERFORM dyn_fld USING 'BDC_OKCODE' '/00'.
    ENDIF.
    PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
      CONCATENATE 'DV70A-SELKZ(' l_cellno ')' INTO l_temp.
      CONDENSE l_temp.
      PERFORM dyn_fld USING l_temp 'X'.
      CLEAR l_temp.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=V70P'.
    PERFORM dyn_scr USING 'SAPDV70A' '0101' 'X'.
      PERFORM dyn_fld USING 'NAST-LDEST' p_print.
      PERFORM dyn_fld USING 'NAST-DIMME' 'X'.
      PERFORM dyn_fld USING 'NAST-TDARMOD' '1'.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=V70B'.
    PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
      CONCATENATE 'DV70A-SELKZ(' l_cellno ')' INTO l_temp.
      CONDENSE l_temp.
      PERFORM dyn_fld USING l_temp 'X'.
      CLEAR l_temp.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=V70I'.
    PERFORM dyn_scr USING 'SAPDV70A' '0102' 'X'.
      PERFORM dyn_fld USING 'NAST-VSZTP' '1'.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=V70B'.
    PERFORM dyn_scr USING 'SAPDV70A' '0100' 'X'.
      PERFORM dyn_fld USING 'BDC_OKCODE' '=V70S'.
    CALL TRANSACTION c_tcode USING it_bdc
                             MODE c_mode     "'N'
                             UPDATE c_updat  "'A'
                             MESSAGES INTO it_mesg.
    IF sy-subrc = 0.
      l_retcode = 0.
    ENDIF.
ENDFORM.                    " bdc_output
*&      Form  dyn_scr
      text
     -->P_0642   text
     -->P_0643   text
     -->P_0644   text
FORM dyn_scr USING    P_0642
                      P_0643
                      P_0644.
    MOVE:  p_0642 TO wa_bdc-program,
           p_0643 TO wa_bdc-dynpro,
           p_0644 TO wa_bdc-dynbegin.
    APPEND wa_bdc TO it_bdc.
    CLEAR wa_bdc.
ENDFORM.                    " dyn_scr
*&      Form  dyn_fld
      text
     -->P_0654   text
     -->P_0655  text
FORM dyn_fld USING    P_0654
                      P_0655.
   MOVE: p_0654 TO wa_bdc-fnam,
         p_0655 TO wa_bdc-fval.
   APPEND wa_bdc TO it_bdc.
   CLEAR wa_bdc.
ENDFORM.                    " dyn_fld
*&      Form  alv_sort
      text
FORM alv_sort.
  DATA: wa_sortcat  TYPE slis_sortinfo_alv.
  WA_SORTCAT-SPOS      = 1.
  WA_SORTCAT-FIELDNAME = 'KUNNR'.
  WA_SORTCAT-UP        = 'X'.
  WA_SORTCAT-EXPA      = 'X'.
Appending gd_sortcat-tabname
  APPEND WA_SORTCAT TO gs_sort.
  CLEAR wa_sortcat.
  WA_SORTCAT-SPOS      = 2.
  WA_SORTCAT-FIELDNAME = 'VBELN'.
  WA_SORTCAT-UP        = 'X'.
  WA_SORTCAT-EXPA      = 'X'.
Appending gd_sortcat-tabname
  APPEND WA_SORTCAT TO gs_sort.
  WA_SORTCAT-SPOS      = 3.
  WA_SORTCAT-FIELDNAME = 'VUNTDAT'.
  WA_SORTCAT-UP        = 'X'.
  WA_SORTCAT-EXPA      = 'X'.
Appending gd_sortcat-tabname
  APPEND WA_SORTCAT TO gs_sort.
ENDFORM.                    " alv_sort

Similar Messages

  • Query related to alv grid

    Hi All,
    I want to read the sub total amount which is displayed on the grid when i double click on it or I want to read the whole line where the subtotal amount is displayed.
    Help me out guru's....
    Thanks in advance.
    Regards,
    Ravi Ganji

    just try once and check rs_selfield-value in debug mode
    U can transfer the rs_selfield-value to another temp variable... this will give the subtotal into another internal table
    form status using p_extab type slis_t_extab.
      set pf-status 'STATUS' excluding p_extab.
    endform.                    "STATUS
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    form user_command using r_ucomm     like sy-ucomm
                                   rs_selfield type slis_selfield.
      case r_ucomm.
        when 'BACK' or 'CANC' or 'EXIT'.
          leave to screen 0.
        when '&IC1'.
          if rs_selfield-fieldname = 'VBELN'.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input  = rs_selfield-value
              importing
                output = temp_vbeln.
         TEMP_VBELN = RS_SELFIELD-VALUE.
            perform get_data_vbrp.
            perform get_second_screen_display.
          endif.
      endcase.
    endform.                    "USER_COMMAND

  • ALV GRID  and Integrated ITS 7 (SAP GUI for HTML) - dissapears on reload

    Hi All,
    We have a custom report that uses an ALV grid to display information to the user. Within this grid, there are fields that are display only and fields that are editable. Also, the grid is wider than the screen's width. It works fine in ECC. It also worked fine when we were using ITS 6.4.
    We have recently upgraded to ITS 7. Now when we run the report using a Transaction iView (in EP 7) or the Webgui service (SAP GUI for HTML), if a field that is editable has focus when an event is triggered that reloads the grid, the screen becomes blank. So, you can click the Save button and the screen goes blank, also, there are date fields in the grid and if you choose a new date, the grid reloads and the screen becomes blank.
    We have found that when the screen is blank, you can use the "Page Up" button on your keyboard and the last few columns of the grid will appear. As if the entire grid has moved off-screen to the left.
    If you click onto a non-editable field and refresh or save, the grid returns to its normal state.
    We are on Basis Patch level 15.
    Does anyone have any ideas on how to fix this?
    Also, does anyone know of a standard SAP transaction we can call from the Webgui that would have a similar setup...with an ALV grid containing editable and non-editable fields? We would like to rule out any errors in the report itself. Since it worked before we upgraded and it works fine in ECC. This would be a really big help too.
    Thank you so much!
    -Kevin

    Hi,
    Thanks Raymond, I have seen Note 314568. I could not get the second link to work but I have looked at just about every Note in reference to Integrated ITS 7 and Tables or ALV Grids and there are very many, so it would appear that SAP has had a hard time with implementing this control, but I have not seen any instance that matches the problem we are having.
    Unfortunately, SAP will not investigate this unless we can provide a standard Transaction that exhibits the same behavior.
    If anyone knows of a standard SAP Transaction that displays an ALV Grid that is wider than the screen (requiring a horizontal scroll bar) and with editable and non-editable fields, that would be fantastic. If we can test against that, then we would know for sure if this is a problem with ITS / SAP GUI for HTML, or if there is an issue with this specific report.
    Thanks!
    -Kevin

  • ALV Grid and ALV List difference?

    Hello,
    Can you help me differentiate ALV List and ALV grid and the low-level definition or context of each?
    Also, can you give me a transaction code that outputs an ALV list as well as a tcode for ALV grid?
    Thanks,
    Jennah

    Hi Kirtish,
    Thanks but I  havent done any function module stuff as I am not an ABAPer but anyway can you guide me through thios?
    "I hope this might slove your query. For more please refer to documentation on ALV and also implement the ALV LIST and GRID reports. By using class Class CL_GUI_ALV_GRID, Function module REUSE_ALV_LIST_DISPLAY , REUSE_ALV_GRID_DISPLAY and some more functions like that only."
    I will give you some tcode can you please try tcode FBL1n? then execute the report. What is the output is it an ALV list?
    I wish to see an ALV list also an ALV grid to see difference.
    Tjhakns,
    Jennah

  • Alv Grid and Table Control

    What is the difference between Alv Grid and Table Control?Explain in detail..

    Table control is a screen table to display table data in a screen. You can add table control to a screen in the Screen Painter. The typical flow-logic to process table control is:
    LOOP AT <internal table> CURSOR <scroll-var>
    [WITH CONTROL <table-control> ]
    [FROM <line1> ] [TO <line2> ].
    ...<actions>...
    ENDLOOP.
    ALV Grid is a SAP Technology to display a set of data on the output screen. For example if you have selected some SAP tables and processed these data in a way you want to display, then you can pass the internal table to the ALV Grid and it will be displayed on the result screen as ALV Grid. See example in SE16 result.

  • ALV Grid and return to selection screen

    Hello
    I have an ALV Grid and when I push a buttom that I program appears another ALV Grid. In this second ALV I try to program different buttoms. When I program the BACK buttom I want to go to selection screen.
    I try with CALL SELECTION SCREEN but when I stay in selection screen and push the execute buttom the ALV that I see is the second, not the first. It seems that we don't catch the news selections.
    I put rs_selfied-refresh = 'X' after the CALL SELECTION SCREEN but is wrong again.
    What can I do????

    Hello Silvia
    There is a simple trick to return from the second ALV list directly back to the selection screen:
    *& Report  ZUS_SDN_REUSE_ALV_GRID_DISPLAY
    REPORT  zus_sdn_reuse_alv_grid_display.
    TYPE-POOLS: slis.
    DATA:
      gt_t001        TYPE STANDARD TABLE OF t001,
      gt_knb1        TYPE STANDARD TABLE OF knb1.
    DATA:
      gs_fcat        TYPE slis_fieldcat_alv,
      gt_fcat_t001   TYPE slis_t_fieldcat_alv,
      gt_fcat_knb1   TYPE slis_t_fieldcat_alv.
    PARAMETERS:
      p_bukrs        TYPE bukrs  DEFAULT '1000'.
    START-OF-SELECTION.
      SELECT * FROM  t001 INTO TABLE gt_t001.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_PROGRAM_NAME               =
    *     I_INTERNAL_TABNAME           =
          i_structure_name             = 'T001'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_INCLNAME                   =
    *     I_BYPASSING_BUFFER           =
    *     I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = gt_fcat_t001
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = syst-cprog
          i_callback_pf_status_set          = 'ALV_SET_PF_STATUS'
          i_callback_user_command           = 'ALV_USER_COMMAND'
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  = ' '
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT                         =
          it_fieldcat                       = gt_fcat_t001
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER           =
    *     ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_t001
    *   EXCEPTIONS
    *     PROGRAM_ERROR                     = 1
    *     OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    END-OF-SELECTION.
    *&      Form  set_pf_status
    *       text
    *      -->RT_EXTAB   text
    FORM alv_set_pf_status USING rt_extab TYPE slis_t_extab.
    * NOTE: identical to STANDARD_FULLSCREEN with additional button
    *       for detail list ('DETAILLIST')
      SET PF-STATUS 'STANDARD_FULLSCREEN'.
    ENDFORM.                    "set_pf_status
    *&      Form  alv_user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM alv_user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    *   Display detail list: all customers for selected company code
        WHEN 'DETAILLIST'.
          IF ( rs_selfield-fieldname = 'BUKRS' ).
            SELECT        * FROM  knb1 INTO TABLE gt_knb1
                   WHERE  bukrs  = rs_selfield-value.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
    *         I_INTERFACE_CHECK                 = ' '
    *         I_BYPASSING_BUFFER                = ' '
    *         I_BUFFER_ACTIVE                   = ' '
                i_callback_program                = syst-cprog
                i_callback_pf_status_set          = 'ALV_SET_PF_STATUS'
                i_callback_user_command           = 'ALV_USER_COMMAND'
    *         I_CALLBACK_TOP_OF_PAGE            = ' '
    *         I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *         I_CALLBACK_HTML_END_OF_LIST       = ' '
                i_structure_name                  = 'KNB1'
    *       IMPORTING
    *         E_EXIT_CAUSED_BY_CALLER           =
    *         ES_EXIT_CAUSED_BY_USER            =
              TABLES
                t_outtab                          = gt_knb1
              EXCEPTIONS
                program_error                     = 1
                OTHERS                            = 2.
            IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    <b>*       NOTE: when the program logic returns from the 2nd ALV list
    *             and exit = 'X' then the program leaves the
    *       1st ALV list, too, and returns to the selection screen.</b>
            rs_selfield-exit = 'X'.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "alv_user_command
    Regards
      Uwe

  • Search print program and sap script

    hii , how can i find  trigring print program and sap script  for a particular  purchase order.
            regards  Aditya
    Edited by: aditya shrivastaba on Apr 14, 2008 9:59 AM

    Hey,
    First go with Me22 or 23 with po that you had, and then check with output type for that in the transaction. After that go to TNAPR table and check the corresponding form and print program.
    Or else, go with NAST table in that put PO num in 123456 and put in OBJKY field in nast table. It will give you the output type of it, so that u can find the print program and lay out in TNAPR
    Many thanks,
    Raghu.

  • How to do changes in Layouts setting and SAP scripts to meet requirment?

    hi SD gurus,
    Please explain me how create and work with Z output .
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward func spec of Z output
    points will be rewarded
    thanx & regards

    you need ABAP skills to do this.
    basically you need:
    1) draw the layout on a piece of paper
    2) define the fields you need and find out the corresponding SAP fields
    3) check the document with the customer
    4) give this specification to the developer
    5) the developer will give you a program name and form name: place them in the message for the document.
    Roberto

  • Help me in alv grid and form printing

    hi experts,
    my requirement is
    i have a check box in the selection screen for  batch processing.
    if i  tick the check box,  the  data  which is in the  t_output  table  should be displayed in alv grid  and
    in turn if i select  one row  in alv o/p  and double click on it  the entire data shold be displayed in the form.
    if 2 rows are selected in alv  and double clicked on it then data in the two rows is dispalyed in the form.
    points  are rewarded .
    thanks in advance.

    Hi,
    Check the following link:
    http://sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm
    Regards,
    bhaskar

  • ALV REPORT: read selected checkbox in alv grid and process the pushbutton

    my requirement is to check some rows from alv grid and the press the pushbutton. Thereby following things should process:
    select all checked rows into an itab and call the transaction code CJ01 for all
    entries......
    I am finding the problem that when I select the checkbox....the internal table doesnt recognize the boxes as checked ones......
    thanks in advance...
    Kartikey Singh,

    Data: ref1 type ref to cl_gui_alv_grid.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              E_GRID = ref1.
          call method ref1->check_changed_data.
          loop at t_output where Flag = 'X'.
            if t_output-VKUEGRU is initial.
              message e000 with text-110.
            endif.
    endloop.

  • Report with two ALV grids and a header

    Hi experts,
    I have a report with two ALV grids in the same screen, each one in a separated container. The information displays it correctly. The report has been implemented by using OO Programming.
    My real trouble is in the header. It must have a logo, a title with a specific font and other information.
    I'll attach a capture of my need:
    [Report with two ALV grids and a header|http://picasaweb.google.com/lh/photo/AcQD49QPmm-0L_jL2iMedA?feat=directlink]
    Then, I want to set up the header you can see, with logo, a font with specific features. Obviously, the header you see has taken from another report. But is the same idea.
    I've tried with a third container, using the CL_GUI_CONTAINER and CL_GUI_CONTAINER classes, but it doesn't work.
    Any idea? Would welcome any help you can provide.
    Thanks in advance,
    Jorge Rojas

    Hi, Jorge.
    Should the header be a"attached" to any of the ALV? Or it should be carried alone?
    If first applies, you've given the solution yourself: put the info & logo in first ALV's header and invoke it from the proper method.
    You could use CL_GUI_DOCKING_CONTAINER CLASS to divide screen in several containers and then, in the upper one, I would create another one docking container to divide the screen into two: the written info could be performed with an HTML viewer class and the logo with a CL_GUI_PICTURE element.
    Cheers.

  • ALV-Grid and update dynpro fields

    Hi!
    I've created a dynpro with an ALV-Grid for Data-Overview and fields on the dynpro to change additional data.
    My ALV has one editable column, when this value change I calculate other value for  a field dynrpo, but I canu2019t see this change in my field dynpro.
    How can I update my data filed dynpro when changing the selected row at the ALV.
    I use the method handle_data_changed to obtain changes in ALV-Grid and it works fine, but I canu2019t update my fileds on the dynpro, when changing value in ALV.
    Thanks for any hints!
    Lili.

    This error occurs becuase when you change anything on the ALV, control is not triggering the PAI and PBO of your dynpro. Hence your values are not getting updated in the dynpro field.
    You should call the CL_GUI_CFW=>DISPATCH in PAI module to trigger the PAI also after the event has been triggered in the ALV.
      CALL METHOD CL_GUI_CFW=>DISPATCH
        importing return_code = return_code.
    * a control event occured => exit PAI
      if return_code <> cl_gui_cfw=>rc_noevent.
        clear g_ok_code.
        exit.
      endif.
    Regards,
    Naimesh Patel

  • ALV Grid and Icon : Printing Problem

    Hi, i develop some reports using ALV Grid and Icon and i'm facing printing problem, all report that using ALV grid with the option icon = 'X' cannot print properly, all the character field showing improper icon instead of the text. While all the ALV grid report with the option icon = ' ' can print normally.
    Thanks.

    Hi,
    Check the Demo Program <b>BCALV_DEMO_TOOLTIP</b>, Here i am able to see the Output Properly, and also able to Print them.
    Regards
    vijay

  • ALV Grid and LIST?

    HI all,
    Diff between ALV GRID and ALV LIST?
    sachin.

    Hi,
    ckeck these differences.
    first one is for list display and second one is for grid display.
    For all practical purposes, they are the same.
    2. Some differences:
    a) from abap coding point of view,
    alv list is done with Function modules,
    alv gris can also be done with FM,
    but can also be done using OO concepts.
    b) Alv grid (using oo concept) requires
    designing the screen layout .
    Hence, in one screen, we can show more
    then one alv grid
    (we cannot show more than
    one alv list on one screen)
    c) ALV grid uses ActiveX controls
    present on the Presentation Server.
    Hence, it consumes More Memory
    on the presentation server.
    d) ALV LIST is Display Only.
    Whereas
    ALV Grid Can Be made EDITABLE for entry purpose.
    e) In alv grid, these options are possible,
    but not in alv list.
    without horizontal lines
    without vertical lines
    without cell merging during sorts
    display total lines above the entries
    ALV LIST Can be coded using only FMs
    ALV GRID Can be coded using FMs and object oriented concepts
    ALV LIST Can be displayed hieraicharlly
    ALV GRID cannot be displayed hierarichally.
    reward points if hlpful.

  • Display totals on the first line in ALV grid and ALV LIST

    Generally we wll display totals at the end..
    bu the requirement is to display it in the first line of the column.
    how to display the totals in the first line?
    I have used ALV GRID and ALV LIST (choice) using function modules.
    Plz help me
    .for example : Po qty : Should display total po qty on the first line of the Po line item.

    IN LAYOUT
    ILAYOUT-totals_before_items = 'X'.
    REGARDS
    SHIBA DUTTA

Maybe you are looking for

  • How do I rebuild a common library used by both iPhoto and Aperture?

    I'm using a common library for both iPhoto and Aperture-latest versions of each and Mavericks. I'm finding photos that are in the library that seem to have fallen out of their events or projects. When I open those events or projects, the folders are

  • What data type do I use in MSA to handle CRM DEC data?

    Dear Geeks, We have a customer field 'ZZ_SUPPORT' on CRM (40 SP11) opportunities, which we flow down to mobile sales. It previously carried a NUMC2 value (a number from 1 - 99), and this worked fine... the data flowed fine in both directions. The dat

  • [Best Practices] Which versioning strategy for the web applications?

    Hi all, An important question when starting to develop a web application is how to correctly make the releases follow-up? That involves to adopt a versioning strategy to definitely fix the version numbers which will be associated to each release. The

  • Cannot "enable directory listing" from the wadm CLI

    With SJSWS 6.1 sp1 up to sp11, there was a documented bug that caused directory listing to work even though the ACL was: acl "default"; authenticate (user, group) {   prompt = "Sun ONE Web Server"; allow (read, execute, info) user = "anyone"; allow (

  • More Widgets?

    Is there a site where you can import more cool widgets into iweb? Seems a shame there are only 9 in the program