Lvc_field catalog merge

Hi all ,
i am using FM  lvc_field catalog merge  in my program
iam not getting any error.
but iam not getting the field catalog.
the exception raised is  interface inconistent.
can anyone pls help.
Regards,Bindu.

Hi
look at this sample program and do accordingly
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 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. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Field catalog merge in Classes

    Hi,
    I need to use field catalog merge without using FM . not manual field catalog.I want to call Class and use in ALV.
    Regards,
    Nandha

    Hi Nandha,
    why you can't use FM?
    it's common to use LVC_FIELDCATALOG_MERGE using ALV GRID CONTROLL (with class).

  • AlV!  Field Catalog Merge!

    Hi!
       What is Field catalog merge in ALV

    Hi,
    YOU HAVE TWO WAYS TO BUILD A FIELD CATALOG
    1) FIRST METHOD
    data w_fieldcat type slis_fieldcat_alv.
    type-pools : slis.
    tables : sflight.
    data : i_fieldcat type slis_T_fieldcat_alv.
    data v_repid like sy-repid.
    data : begin of i_sflight occurs 0,
           carrid like sflight-carrid,
           connid like sflight-connid,
           fldate like sflight-fldate,
            end of i_sflight.
    w_fieldcat-tabname = 'I_SFLIGHT'.
    w_fieldcat-fieldname = 'CARRID'.
    w_fieldcat-outputlen = '10'.
    w_fieldcat-col_pos = '1'.
    w_fieldcat-row_pos = '1'.
    w_fieldcat-seltext_l = 'Carrie ID'.
    w_fieldcat-seltext_M = 'Carrie ID'.
    w_fieldcat-seltext_S = 'Carrie ID'.
    w_fieldcat-HOTSPOT = 'X'.
    append w_fieldcat to i_fieldcat.
    clear w_fieldcat.
    w_fieldcat-tabname = 'I_SFLIGHT'.
    w_fieldcat-fieldname = 'CONNID'.
    w_fieldcat-outputlen = '10'.
    w_fieldcat-col_pos = '1'.
    w_fieldcat-row_pos = '1'.
    w_fieldcat-seltext_l = 'CONNI ID'.
    w_fieldcat-seltext_M = 'CONNI ID'.
    w_fieldcat-seltext_S = 'CONNIID'.
    w_fieldcat-HOTSPOT = 'X'.
    append w_fieldcat to i_fieldcat.
    clear w_fieldcat.
    w_fieldcat-tabname = 'I_SFLIGHT'.
    w_fieldcat-fieldname = 'FLDATE'.
    w_fieldcat-outputlen = '10'.
    w_fieldcat-col_pos = '1'.
    w_fieldcat-row_pos = '1'.
    w_fieldcat-seltext_l = 'FLDATE.
    w_fieldcat-seltext_M = 'FLDATE'.
    w_fieldcat-seltext_S = 'FLDATE'.
    w_fieldcat-HOTSPOT = 'X'.
    append w_fieldcat to i_fieldcat.
    clear w_fieldcat.
    2)  SECOND METHOD
    data w_fieldcat type slis_fieldcat_alv.
    type-pools : slis.
    tables : sflight.
    data : i_fieldcat type slis_T_fieldcat_alv.
    data v_repid like sy-repid.
    data : begin of i_sflight occurs 0,
           carrid like sflight-carrid,
           connid like sflight-connid,
           fldate like sflight-fldate,
            end of i_sflight.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
           exporting
                i_program_name     = v_repid
                i_internal_tabname = 'I_SFLIGHT'
                i_inclname         = v_repid
           changing
                ct_fieldcat        = I_fieldcatalog_TYPE.
    Reward points if helpful
    THANKS
    Venki

  • Merge times in publisher catalog merge

    I using Publisher Catalog merge to create certificates for our swimming club with the kids times recorded on them. But when I merge times with hundreds of seconds that are over 60 seconds the hundreds of seconds are rounded up - for example 1.75 will become
    2.15. I'm merging out of excel where the cells are formatted as mm:ss.00 and appear correct - it's only when they are merge that this happens - I'm sure I've had this problems in previous years I just can't remember how I solved it!        
                                 

    How did you set the time as 1.75 in Excel? Does 1.75 means 1 minute and 75 seconds?
    Flynn

  • When do we need field catalog merge in ALV

    Hi all,
    When do we actually need fieldcatalog merge in ALV's
    Regards
    Saroja.

    Hi
    When you want the field catalog to be populated directly from the internal table or a structure, you can use this function module. If you are populating the field catalog from an internal table in an include other than your top include, then the include name also has to be passed to the function module.
    reward if helpful
    regards,
    madhu

  • Doubt in using field catalog merge function

    hi all,
        When I am using the function maodule reuse_alv_fieldcatalog_merge for building the field catalog in alv list,it was giving abend message as
    'Field catalog is empty'.
         what might be the reason for such message?can some one help me out with the solution to get rid of that.
        I cant populate the catalog manually because I need to display nearly 40 fields in the output.
             Thanks in advance.

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
    Data declaration
    Data retrieval
    Build fieldcatalog
    Build layout setup
    *& Report ZDEMO_ALVGRID *
    *& Example of a simple ALV Grid Report *
    *& The basic requirement for this demo is to display a number of *
    *& fields from the EKKO table. *
    REPORT zdemo_alvgrid .
    TABLES: ekko.
    type-pools: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
    gd_tab_group type slis_t_sp_group_alv,
    gd_layout type slis_layout_alv,
    gd_repid like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *& Form BUILD_FIELDCATALOG
    * Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    * I.e. Field type may be required in-order for
    * the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    * fieldcatalog-do_sum = 'X'.
    * fieldcatalog-no_zero = 'X'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-do_sum = 'X'. "Display column total
    fieldcatalog-datatype = 'CURR'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    endform. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    * Build layout for ALV grid report
    form build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    * gd_layout-totals_only = 'X'.
    * gd_layout-f2code = 'DISP'. "Sets fcode for when double
    * "click(press f2)
    * gd_layout-zebra = 'X'.
    * gd_layout-group_change_edit = 'X'.
    * gd_layout-header_text = 'helllllo'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    * Display report using ALV grid
    form display_alv_report.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = gd_repid
    * i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    * i_callback_user_command = 'USER_COMMAND'
    * i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    * it_special_groups = gd_tabgroup
    * IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    * is_variant = z_template
    tables
    t_outtab = it_ekko
    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. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    * Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
    from ekpo
    into table it_ekko.
    endform. " DATA_RETRIEVAL

  • Reg:web catalog merge

    hi,
    i have a requirement to merge two different web catalogs each having it's own users,groups,privilleages.so if i use copy and paste all the folders in catalog 1 to catalog 2,does this completes my merge i.e.., copying all folders like groups,privgs,metadata,users,shared.
    thanks

    Copy and paste is not always a good practice. Use Web catalog Instead.
    Please follow the following link to do so.
    http://www.iwarelogic.com/wp-content/uploads/blogimg/2010/06/Artcle%20on%20Repository%20and%20Web%20Catalog%20Merge%20in%20OBIEE.pdf
    **** please close the thread if it answers your question.. It will help others also ************
    Thanks
    V

  • Catalog merging - 1 drive to 2, old to new computer?

    Another catalog issue... one I cannot find discussion of. I have been using Lightroom since the beginning on an older PC running Windows XP (currently ver 3.5). The way I began using LR was to only import those images which I wanted to work with. Basically these were all in the same parent directory (/images) and reasonably well organized. Having just set up a new Windows 7 PC with plenty of memory and speed, I would like to import all of my digital photos (100K+) to LR. I would also like to have my old catalog, containing metadata on ~2,600 images that I have worked with.
    I would like to have the catalog on my boot drive; all images are on another, larger drive. So far, I have not been able to make this work. Most attempts result in the catalog being on the boot drive and unable to find the images. No parent folder shows up in the C: folder (cataloged), so I can't point the whole batch of cataloged images to the right drive. It seems the only alternative I have is doing this folder by folder.
    Any suggestions greatly welcomed!

    If I were in your situation, I would start out freash from the start.
    But first: It is generally not recommended that you put the LR catalog on the boot drive - assuming that's where LR resides. To speed LR up it's best to have the catalog on a different but very fast drive.
    It could even be an external hard drive provided it's an eSata drive.
    To get all your images into LR I'd suggest as follows:
    You have to keep your existing LR catalog or you'd loose the work that you did in the past. And you have to get all the other images into this catalog.
    First I would separate the images already imported into LR and all the other images. Open LR with your existing catalog and organize the already imported images in LR. In LR move them to one new parent folder descriptively named. If you have moved or re-named these images outsie of LR, you have to point LR to the new location.
    You will be able to see the parent folder with the descriptive name in your OS (Finder / Win Explorer) so you know these are the ones already in LR and in its catalog.
    Then I would organize all my other images (the ones not yet not imported into LR) where I want them and in the folders as I want them. I'd do this in my OS and organize them all in one parent folder (with sub-folders). So after this you'd have two parent folders on your hard drive, one "Images already in LR" and one "Images to be imported into LR".
    Then I'd open LR and would import all of these images from the parent folder "Images to be imported into LR" in one fell swoop. That way LR would build a catalog representing the "new" situation on your hard drive and you don't have to do any finding of "missing" images and or folders.
    Finally you might want to re-organize the images that were already in LR previously. But do it in LR so that LR can keep track of the changes you made.
    WW

  • Field catalog merge

    Hi ,
                I have passed the internal table name which is going to be displayed in the output to the parameter I_Tablename in REUSE_ALV_FIELDCATALOG_MERGE, but its going to the short dump... If i pass the structure name say zstru to I_Structurename in the function module its not going to the dump... Any one can please explain where exactly the problem is ... and one more thing i am working with ECC 6.0 Version..
    Thank & Regards.
    Laxman.P
    B'lore.

    Paas the name of internal table in CAPS and within commas
    eg
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME         = SY-CPROG
          I_INTERNAL_TABNAME     = 'GT_HEAD'
          I_STRUCTURE_NAME       = 'ZHRG_MED'
        CHANGING
          CT_FIELDCAT            = P_FCAT
        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.
    U can also try the following code without commas
    FORM init_fieldcat USING    itab  type any
                                incl type any.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv,
            i_repid LIKE sy-repid.
      i_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
             i_program_name         = i_repid
             i_internal_tabname     = itab
           I_STRUCTURE_NAME       =
             i_client_never_display = 'X'
             i_inclname             = incl
           I_BYPASSING_BUFFER     =
           I_BUFFER_ACTIVE        =
           CHANGING
             ct_fieldcat            = i_fieldcat
           EXCEPTIONS
             inconsistent_interface = 0
             program_error          = 0
             OTHERS                 = 0.
    ENDFORM.                    " INIT_FIELDCAT
    Reward points , if useful

  • ALV int report using field catalog  merge

    Hi folks,
    Can anyone here please provide me an alv interactive report?
    K.Kiran.

    report  zialv_edit_simple1            .
    include <icon>.
    Definition of Grid event-handler class
    class lcl_grid_event_receiver definition.
      public section.
        methods:
          toolbar              for event toolbar
                                of cl_gui_alv_grid
                                importing e_object
                                          e_interactive
        ,user_command         for event user_command
                                of cl_gui_alv_grid
                                importing e_ucomm
    .  " Period
    endclass.
    *mplementation of Grid event-handler class
    class lcl_grid_event_receiver implementation.
    Method for handling all creation/modification calls to the toolbar
      method toolbar.
        data : ls_toolbar type stb_button.
    Define Custom Button in the toolbar
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EDIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'EDIT' to ls_toolbar-text.
        move icon_change_text to ls_toolbar-icon.
        move 'Click2Edit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'UPDA' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'UPDATE' to ls_toolbar-text.
        move icon_system_save to ls_toolbar-icon.
        move 'Click2Update' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EXIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'EXIT' to ls_toolbar-text.
        move icon_system_end to ls_toolbar-icon.
        move 'Click2Exit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
      endmethod.
    Method to handle user commands from toolbar
      method user_command.
        case e_ucomm .
          when 'EDIT'.
            perform set_input.
          when 'UPDA'.
            perform refresh_disp.
            perform update_table.
          when 'EXIT'.
            leave program.
        endcase.
      endmethod.
    endclass.
           Declarations
    parameters:
      p_intab type dfies-tabname default 'SAPLANE'.
    data :
      dref type ref to data,
      it_grid_fcat type lvc_t_fcat,
      struct_grid_lset type lvc_s_layo,
      tab_info like table of dfies.
    field-symbols :
      <fs_tab> like line of tab_info,
    Output Structure****
      <it_disptab> type table.
    data :
        ok_code like sy-ucomm
       ,save_ok like sy-ucomm
    Container Object [grid_container]
      ,grid_container type ref to cl_gui_custom_container
    Control Object [grid]
      ,grid type ref to cl_gui_alv_grid
    Event-Handler Object [grid_handler]
    ,grid_handler type ref to lcl_grid_event_receiver
      . " period
    Begin of process logic
    start-of-selection.
      call screen '0100'.
    *&      Module  STATUS_0100  OUTPUT
         PBO module ...Displays the Grid
    module status_0100 output.
    A L V    G R I D
      if grid_container is initial.
        create object grid_container
            exporting
              container_name = 'CCONTAINER1'.
        create object grid
            exporting
               i_appl_events = 'X'
               i_parent = grid_container.
        create object grid_handler.
        set handler:
           grid_handler->user_command for grid,
           grid_handler->toolbar for grid .
    *Assigning the input value to <fs_tab>-tabname
        assign p_intab to <fs_tab>-tabname .
        call function 'LVC_FIELDCATALOG_MERGE'
             exporting
                  i_structure_name = <fs_tab>-tabname
             changing
                  ct_fieldcat      = it_grid_fcat.
    *Creating internal table
        call method cl_alv_table_create=>create_dynamic_table
           exporting
               it_fieldcatalog           = it_grid_fcat
           importing
               ep_table                  = dref.
        assign  dref->* to <it_disptab>.
        perform populate_grid_data .
        call method grid->set_ready_for_input
            exporting
              i_ready_for_input = 0.
    *Enabling the grid to edit mode,
    *setting table name as title of the grid
        struct_grid_lset-edit = 'X'. "To enable editing in ALV
        struct_grid_lset-grid_title  = p_intab.
        call method grid->set_table_for_first_display
          exporting
            is_layout           = struct_grid_lset
          changing
            it_outtab             =  <it_disptab>
            it_fieldcatalog       =  it_grid_fcat
        .      " Period
      endif.
    endmodule.
    *&      Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
    ****User Commands are handled as events in method user_command.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
    form exit_program.
      call method grid_container->free.
      call method cl_gui_cfw=>flush.
      leave program.
    endform.                  " EXIT_PROGRAM
    *&      Form  populate_grid_data
    form populate_grid_data.
    select * from (p_intab) into corresponding fields of table <it_disptab>.
    endform.                     " populate_grid_data
          FORM refresh_disp                                             *
    form refresh_disp.
      call method grid->refresh_table_display.
    endform.
          FORM update_table                                             *
    form update_table.
      modify (p_intab) from table <it_disptab>.
      call method grid->set_ready_for_input
          exporting
              i_ready_for_input = 0.
    endform.
          FORM set_input                                                *
    form set_input.
      call method grid->set_ready_for_input
         exporting
           i_ready_for_input = 1.
    endform.
    Screen Logic :
    process before output.
      module status_0100.
    process after input.
      module user_command_0100.

  • I want to move photos from my laptop to desktop and merge catalogs

    I have Photoshop Elements 5 on my desktop with about 15,000 photos.  Prior to a big trip I bought a laptop and loaded Elements 9 on it. I took about 5,000 pictures on the trip and organized them.  Now I'm back and I want everything from my laptop on my desktop, including my copy of Elements 9.
    I can probably figure out how to get Elements 9 from my laptop to desktop, however I searched the forums and it appears you can't merge catalogs.
    Can anyone recommend the best way to handle my situation?
    What I'm thinking...
    Upgrade my desktop from Elements 5 to Elements 9. 
    Make sure my old Elements 5 catalog on my desktop is converted and functioning in Elements 9.
    Copy all my files from the Laptop to the Desktop
    Import all my files
    Done.
    The only problem is I will lose all the organization I did on my laptop!  I don't want that.
    Thanks!

    I think its the best solution to write tags and all in photographs.... and get them back on import...
    Here is one article about the simple case of migrating from one machine to other..: http://photoshopelementsbyadobe.blogspot.com/2010/06/how-to-transfer-your.html
    There is no easy solution to catalog merging and one needs to look for solutions as suggested in last reply

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL

  • Correct procedure to export/import catalog

    I took photos on my vacation and imported them into Lightroom 4 on my laptop. The RAW files are separated by Date folders. I have edited many of them and saved the resulting jpgs in a separate folder called jpg exports, as a subfolder in each date folder.
    I have selected each of the date folders and the jpg export folders and selected "Export as a Catalog"
    From that window, I have selected my external drive, created a file name Caribbean, deselected "Export Selected Photos only" as I want all of the photos I selected.
    Export Negative files and Include Available Previews is selected.
    The Catalog Export starts.
    That process is underway as I type.
    When I did this process in the past, my next step was to plug my external into my desktop, launch Lightroom 4 and import the catalog off of the external drive. When I did this before, the RAW files by date showed up in Lightroom, but each of the jpg folder didn't transfer.
    What am I doing wrong or is it not possible to transfer the jpg edits over as part of the catalog?

    "Import from Catalog" will only pay attention to images which are directly represented in the Catalog you have selected - which show a thumbnail there.
    The fact that your JPG exports may be physically located inside the same folders as the Raw files that you have imported, or elsewhere, has no relevance here. If when you exported these JPGs, you selected the "import to Catalog" option then they will be represented in the Catalog and will therefore be included... but unless you actively want to see these exports next to the raw based images, in LR, with all the potential for confusion that brings - I am not going to suggest that as a good idea.
    It is not necessary to first "Export as Catalog". You can directly put the Catalog you have already made, or a copy of that, onto the external drive. Also you can directly move (probably, Copy is safer) all the image folders bodily onto this external drive. These things can be done in your standard file browser (Finder / Explorer), when Lightroom is not running on the laptop.
    Then you can connect your external drive to the Desktop, and start your main LR Catalog there. You can "import from catalog" (merge) all the images thumbnails, with their settings and metadata etc, into the desktop's LR catalog. All the images that you saw in the laptop, will now appear in the desktop too. If you only imported the Raws before, that is all you will see now.
    The physical addressing information for each Raw file, as when originally imported, will also be transferred along with the other metadata.
    So at this point the image thumbnails you have merged into your desktop catalog appear "offline" - the stored addressing they have, currently does not work in its new context. There will be a whole tree of date-based folders listed, corresponding to how things looked within the laptop, but at the moment showing  "not found" so far as the desktop is concerned. This is OK - easily fixable.
    You next need to decide where you want these image folders from the trip, to be located long-term. Transfer them bodily into that location (using Finder / Explorer). This should (in one go) include all the Raw files and the prior JPG exports, keeping the relative arrangement and naming of all these folders and subfolders intact. 
    Then in the Folders list of  your desktop Catalog, you can right-click on the highest-level folder which is currently marked as "not found" with a ? icon.  Then re-browse that to the new location where you have just put the transferred image folders. LR can then in one operation, not only update the file location information it holds for that folder, but also for all known contents of that folder - which means, all the imported images inside, and their containing subfolder "tree" - the whole trip. This will make all the transferred images from that trip "wake up again", and no longer be offline. You can now carry on editing them just as you did on the laptop.
    If you have used a structured date-folder arrangement (such as, one of the automatic ones LR provides) in a 100% consistent manner when working on the desktop and when working on the laptop, your images from the trip can merge seamlessly into your main library.

  • Translation of the Field label that is passe in the field catalog on ALV

    Hiii
    i there a way to make ALV column field label in different language
    let say i have 3 radio button language english , french , and dutch
    depending on the radio button selected i want my alv column fields to be display in that language.
    note i am using field catalog merge and alv list.
    i know that can be done by forcing value in the fieldcat-fieldname
    something like that
    IF english
    fieldcat-fieldname = English
    If frence
    fieldcat-fieldname = french
    if dutch
    fieldcat-fieldname = dutch
    but suppose i have 50 field then i must do that with all 50 field for each language
    i there some more easier way like setting sy-langu or setting language in the fieldcat

    Hi newbie82 c,
    the easiest way is to use the SAP logon language and have all texts in program defines as text fields. The text fields are translated once and fetched always correct according to logon language.
    If you want to switch languages by radiobutton, you may define one create_fieldcat routine for each language.
    Regards,
    Clemens

  • ALV Field catalog problem

    Hi All
    I am doing field catalog merge for a structure using the FM
    'LVC_FIELDCATALOG_MERGE' . I am passing the structure to this FM.
    Initially there were 14 fields in the structure. I added a new field
    and activated the structure. But it still shows only 14 fields instead of 15.
    Please Reply ASAP.
    Thanks.
    Praveena.

    Yes, go in debug mode.Keep a break point at K_KKB_FIELDCAT_MERGE.
    This fm has following code. Keep a break point in second ALV_CHECK_BUFFER.
      call function 'ALV_CHECK_BUFFER'
        exporting
          i_buffer_type      = 'A'
          i_buffer_active    = i_buffer_active
          i_bypassing_buffer = i_bypassing_buffer
          i_refresh_buffer   = ' '
        importing
          e_import           = l_import
          e_export           = l_export
          e_delete           = l_delete.
      call function 'ALV_CHECK_BUFFER'
        exporting
          i_buffer_type      = 'B'
          i_buffer_active    = i_buffer_active
          i_bypassing_buffer = i_bypassing_buffer
          i_refresh_buffer   = ' '
        importing
          e_import           = l_import_b
          e_export           = l_export_b
          e_delete           = l_delete_b.
    After the second ALV_CHECK_BUFFER executes, clear value of variable l_import_b. This will help you to see new added fields to your structure in report output.

Maybe you are looking for

  • PSE 13 arbeitet langsam

    Hallo, PSE 13 hat Probleme bei mehreren Akionen hintereinander, stapeln von 2 Fotos, versehen mit Tags, löschen, verschieben in Kataloge, sowie beim integrieren von im Editor bearbeiteten Fotos im Organizer. es sind lange Wartezeiten nötig um die näc

  • Downloaded bin files are associated with excel

    I know that they should day open with application. How do I switch bin files to be opened with application instead of excel. I don't know what to select under the Open With: -> Other menu

  • Adobe Flash Player is installing SPYWARE! ... It is called "Google"

    Upon turning my PC on today, I got the standard black pop-up window from  Adobe, advising that a new version of Flash Player was available for  download, which I agreed to do. As the installer ran, I saw that Google Chrome was being installed  withou

  • Desktop flashing & laptop 'stuck' since doing iPhoto software update

    Recently  I was alerted to a software upgrade to iPhoto/iMovie. I set this to go but my laptop seems to have got 'stuck' since installing the software update (which took 3 days of stopping & resuming). I cannot open iPhoto or any other software (even

  • I have the soloution for chatting to a pc from a mac

    Hello After meny hours of trying to solve this problem with one mesanger service I found that this solution works the best well it is the only one that works. I now have the solution to the problem of having a a/v chat to a pc you will need the follo