Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

*&---------------------------------------------------------------------*

*& Report ZALVPROGRAM

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*REPORT ZALVPROGRAM.

INCLUDE <icon>.

Include <color>.

TYPES: t_raw(1024) TYPE x.

TYPE-POOLS: vrm.

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

DATA: l_name TYPE string,

l_wb_form TYPE REF TO if_fp_wb_form,

l_form TYPE REF TO if_fp_form,

l_xstring TYPE xstring,

l_language TYPE langu,

l_form_layout TYPE fplayoutt,

l_layout TYPE REF TO if_fp_layout,

l_mode TYPE string,

outstring TYPE string,

loops TYPE i VALUE 1,

index TYPE i VALUE 1,

attname TYPE string,

attvalue TYPE string,

curchild TYPE REF TO if_ixml_mini_node,

nodename TYPE string,

dom TYPE REF TO if_ixml_mini_dom,

root TYPE REF TO if_ixml_mini_node,

l_interface_name TYPE fpname,

l_interface_type TYPE fpinterfacetype,

l_interface TYPE REF TO if_fp_interface,

lt_color TYPE lvc_t_scol,

ls_color TYPE lvc_s_scol,

gid TYPE i.

DATA: l_node TYPE REF TO if_fp_node,

l_interface_data TYPE REF TO if_fp_interface_data,

l_xsd_definitions TYPE REF TO if_fp_xsd_definitions,

l_xsd_schema TYPE REF TO cl_fp_xsd_schema,

l_exception TYPE REF TO cx_fp_api_repository,

l_rcx_rep TYPE REF TO cx_fp_api_repository,

l_file_table TYPE filetable,

l_filename TYPE string,

l_pathname TYPE string,

l_fullpath TYPE string,

l_rc TYPE i,

l_user_action TYPE i,

l_binary_table TYPE TABLE OF t_raw,

l_binary_length TYPE i,

temp_path TYPE string VALUE 'C:\',

check_path TYPE string,

flag TYPE abap_bool,

msg TYPE string,

xdp_flag TYPE c,

xsd_flag TYPE c,

fxml_flag TYPE c,

ixml_flag TYPE c,

dl_flag TYPE c.

DATA: ndflag TYPE string,

sflag TYPE string,

fldflag TYPE string,

tt_text TYPE string,

t_space TYPE string VALUE space,

tcindentl TYPE string,

tcindentr TYPE string,

tcindentt TYPE string,

tcindent TYPE string,

tcin_flg,

tcspacinga TYPE string,

tcspacingb TYPE string,

tcspacingl TYPE string,

tcspacing TYPE string,

tcs_flg,

tvindentl TYPE string,

tvindentr TYPE string,

tvindentt TYPE string,

tvindent TYPE string,

tvin_flg,

tvspacinga TYPE string,

tvspacingb TYPE string,

tvspacingl TYPE string,

tvspacing TYPE string,

tvs_flg,

ndindex TYPE i,

sindex TYPE i,

fldindex TYPE i.

DATA: bind_flg, desc_flg,txt_flg,line_flg,calc_flg,fc_flag,dp_flag,

fv_flag, fa_flag, fp_flag,fvnode_flag,fdnode_flag,script_flag,sf_flag,

lflag,mpage,pmedium,exdata_flg,scr_flag,speak_flg.

DATA: margin_flg,para_flg.

TYPES: BEGIN OF wa_page,

pindex TYPE i,

page TYPE string,

cntarea TYPE string,

name TYPE string,

x TYPE string,

y TYPE string,

h TYPE string,

w TYPE string,

pageformat TYPE string,

orientation TYPE string,

END OF wa_page.

TYPES: it_page TYPE wa_page OCCURS 0.

TYPES: BEGIN OF wa_subform,

sindex TYPE i,

subform TYPE string,

name TYPE string,

x TYPE string,

y TYPE string,

h TYPE string,

w TYPE string,

cnttyp TYPE string,

acc_role TYPE string,

binding TYPE string,

END OF wa_subform.

TYPES: it_subform TYPE wa_subform OCCURS 0.

TYPES: BEGIN OF wa_element,

light TYPE char1,

findex TYPE i,

name TYPE string,

ftype TYPE string,

caption TYPE string,

x TYPE string,

y TYPE string,

h TYPE string,

w TYPE string,

cfont TYPE string,

cfsize TYPE string,

cpvalign TYPE string,

cindent TYPE string,

cspacing TYPE string,

vfont TYPE string,

vfsize TYPE string,

vpvalign TYPE string,

vindent TYPE string,

vspacing TYPE string,

lmargin TYPE string,

rmargin TYPE string,

tmargin TYPE string,

bmargin TYPE string,

visible TYPE string,

dpattern TYPE string,

acc_prio TYPE string,

acc_value TYPE string,

default TYPE string,

script TYPE string,

binding TYPE string,

locale TYPE string,

atype TYPE string,

END OF wa_element.

TYPES: it_element TYPE wa_element OCCURS 0 .

TYPES: BEGIN OF wa_final,

light TYPE char1,

findex TYPE i,

name TYPE string,

ftype TYPE string,

caption TYPE string,

x TYPE string,

y TYPE string,

h TYPE string,

w TYPE string,

cfont TYPE string,

flg_cfont,

cfsize TYPE string,

flg_cfsize,

cpvalign TYPE string,

cindent TYPE string,

cspacing TYPE string,

vfont TYPE string,

flg_vfont,

vfsize TYPE string,

flg_vfsize,

vpvalign TYPE string,

vindent TYPE string,

vspacing TYPE string,

lmargin TYPE string,

rmargin TYPE string,

tmargin TYPE string,

bmargin TYPE string,

visible TYPE string,

flg_visible,

dpattern TYPE string,

flg_dpattern,

acc_prio TYPE string,

flg_acc_prio,

acc_value TYPE string,

flg_acc_value,

default TYPE string,

flg_default,

script TYPE string,

flg_script,

binding TYPE string,

flg_binding,

locale TYPE string,

flg_locale,

atype TYPE string,

flg_atype,

t_color TYPE lvc_t_scol,

END OF wa_final.

TYPES: it_final TYPE wa_final OCCURS 0 .

TYPES: BEGIN OF form_info,

form_name TYPE fpname,

fcreated TYPE string,

fcre_date TYPE fplastdate,

fcre_time TYPE fpfirsttime,

fchanged TYPE string,

fchng_date TYPE fplastdate,

fchng_time TYPE fplasttime,

flanguage TYPE langu,

fpackage TYPE devclass,

interface_name TYPE fpname,

icreated TYPE string,

icre_date TYPE fplastdate,

icre_time TYPE fpfirsttime,

ichanged TYPE string,

ichng_date TYPE fplastdate,

ichng_time TYPE fplasttime,

ilanguage TYPE langu,

ipackage TYPE devclass,

interface_type TYPE string,

ref_count TYPE string,

form_locale TYPE string,

END OF form_info.

DATA: form_info TYPE form_info.

DATA: wa_page TYPE wa_page,

wa_subform TYPE wa_subform,

wa_element TYPE wa_element,

wa_final TYPE wa_final,

it_page TYPE it_page,

it_subform TYPE it_subform,

it_ftemp TYPE it_final,

it_final TYPE it_final,

it_element TYPE it_element,

it_display TYPE it_element.

DATA: gr_table TYPE REF TO cl_salv_table.

CONSTANTS: gc_true TYPE sap_bool VALUE 'X',

gc_false TYPE sap_bool VALUE space.

*----------------------------------------------------------------------

PARAMETER: p_form TYPE fpwbformname OBLIGATORY .

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 2.

SELECTION-SCREEN COMMENT 1(15) text-002.

SELECTION-SCREEN POSITION 68.

PARAMETERS: l_local(20) AS LISTBOX VISIBLE LENGTH 30 DEFAULT 'No'.

SELECTION-SCREEN COMMENT 50(16) text-016 FOR FIELD l_local.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_all RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(20) text-007 FOR FIELD r_all.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_font RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-008 FOR FIELD r_font.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_bfld RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-009 FOR FIELD r_bfld.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_sfld RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-010 FOR FIELD r_sfld.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_acc RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-012 FOR FIELD r_acc.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_atyp RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-014 FOR FIELD r_atyp.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 5.

PARAMETER: r_locl RADIOBUTTON GROUP g2 .

SELECTION-SCREEN COMMENT 10(83) text-015 FOR FIELD r_locl.

SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN.

TRY.

CALL METHOD cl_fp_wb_helper=>form_exists

EXPORTING

i_name = p_form.

CATCH cx_fp_api_usage.

MESSAGE e572(ez) WITH p_form .

CATCH cx_fp_api_repository INTO l_rcx_rep.

IF l_rcx_rep->textid = cx_fp_api_repository=>object_not_existing.

MESSAGE s572(ez) WITH p_form .

STOP.

ENDIF.

ENDTRY.

AT SELECTION-SCREEN OUTPUT.

name = 'L_LOCAL'.

PERFORM locale_list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

START-OF-SELECTION.

dom = cl_ixml_mini=>create_dom( ).

root = dom->get_root_element( ).

IF NOT p_form IS INITIAL.

PERFORM get_interface_name.

PERFORM form_interface_check.

ENDIF.

PERFORM get_interface_info.

PERFORM get_version.

PERFORM parse_layout.

DO 1 TIMES.

root = dom->get_root_element( ).

PERFORM get_nodeinfo USING root.

ENDDO.

DATA: rcnt TYPE i.

DESCRIBE TABLE it_ftemp LINES rcnt.

IF NOT r_all IS INITIAL.

it_final[] = it_ftemp[].

ELSE.

DO rcnt TIMES.

READ TABLE it_ftemp INTO wa_final INDEX sy-index .

IF sy-subrc = 0.

IF NOT r_font IS INITIAL.

IF wa_final-flg_cfont = 'X' OR wa_final-flg_cfsize = 'X' OR

wa_final-flg_vfont = 'X' OR wa_final-flg_vfsize = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

IF NOT r_bfld IS INITIAL.

IF wa_final-flg_binding = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

IF NOT r_sfld IS INITIAL.

IF wa_final-flg_script = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

IF NOT r_atyp IS INITIAL.

IF wa_final-flg_atype = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

IF NOT r_locl IS INITIAL.

IF wa_final-flg_locale = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

IF NOT r_acc IS INITIAL.

IF wa_final-flg_acc_value = 'X'.

APPEND wa_final TO it_final.

ENDIF.

ENDIF.

ENDIF.

ENDDO.

ENDIF.

END-OF-SELECTION.

IF NOT it_final[] IS INITIAL.

PERFORM alv_dispaly.

ELSE.

MESSAGE s001(ez) WITH

'Informationis not available for the selected criteria' ' ' ' ' ' '.

STOP.

ENDIF.

*---------------------------------------------------------------

FORM get_interface_name.

TRY.

CALL METHOD cl_fp_wb_form=>load

EXPORTING

i_name = p_form

RECEIVING

r_wb_form = l_wb_form.

CATCH cx_fp_api_usage.

CATCH cx_fp_api_repository.

CATCH cx_fp_api_internal.

ENDTRY.

l_language = l_wb_form->if_fp_wb_object~get_master_language( ).

l_form = cl_fp_form=>create( i_language = l_language ).

l_form ?= l_wb_form->get_object( ).

TRY.

l_interface = l_form->get_interface( ).

CATCH cx_fp_api_usage.

CATCH cx_fp_api_repository.

CATCH cx_fp_api_internal.

ENDTRY.

l_interface_type = l_interface->get_interface_type( ).

form_info-interface_type = l_interface_type.

l_interface_name = l_form->get_interface_name( ).

ENDFORM. "upload_and_parse

*&---------------------------------------------------------------------*

*& Form form_interface_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM form_interface_check .

DATA: l_rcx_root TYPE REF TO cx_root.

DATA: l_rcx_rep TYPE REF TO cx_fp_api_repository.

DATA: active_state TYPE fpstate,

flag,

emsg(25).

DATA: l_wb_interface TYPE REF TO cl_fp_wb_interface.

*---------FORM--------------------

*Form Existance

TRY.

CALL METHOD cl_fp_wb_helper=>form_exists

EXPORTING

i_name = p_form.

CATCH cx_fp_api_usage.

MESSAGE e572(ez) WITH p_form .

CATCH cx_fp_api_repository INTO l_rcx_rep.

IF l_rcx_rep->textid = cx_fp_api_repository=>object_not_existing.

MESSAGE s572(ez) WITH p_form .

STOP.

ENDIF.

ENDTRY.

*Active State

TRY.

CALL METHOD cl_fp_wb_helper=>form_state

EXPORTING

i_name = p_form

RECEIVING

r_state = active_state.

IF active_state = 'I'.

MESSAGE s576(ez) WITH p_form .

STOP.

ENDIF.

CATCH cx_fp_api_usage.

CATCH cx_fp_api_repository.

ENDTRY.

*-------FORM INTERFACE--------------------------

TRY.

CALL METHOD cl_fp_wb_helper=>interface_exists

EXPORTING

i_name = l_interface_name.

CATCH cx_fp_api_usage.

MESSAGE e506(ez) WITH 'Interface for' p_form .

CATCH cx_fp_api_repository INTO l_rcx_rep.

IF l_rcx_rep->textid = cx_fp_api_repository=>object_not_existing.

MESSAGE s506(ez) WITH 'Interface for' p_form .

STOP.

ENDIF.

CATCH cx_fp_api_internal .

ENDTRY.

CLEAR : active_state.

CONCATENATE 'for the form ' p_form INTO emsg.

*Active State

TRY.

CALL METHOD cl_fp_wb_helper=>interface_state

EXPORTING

i_name = l_interface_name

RECEIVING

r_state = active_state.

IF active_state = 'I'.

MESSAGE s003(fpapichk) WITH l_interface_name .

STOP.

ENDIF.

CATCH cx_fp_api_usage.

CATCH cx_fp_api_repository.

ENDTRY.

ENDFORM. " form_check

*&---------------------------------------------------------------------*

*& Form get_interface_info

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM get_interface_info .

DATA: l_interface_parameters TYPE REF TO cl_fp_interface_parameters,

l_parameters_table TYPE tfpinterfacepar,

l_parameter TYPE sfpinterfacepar,

l_value_tab TYPE TABLE OF sfpparameter,

l_value TYPE sfpparameter,

c_true VALUE 'X'.

CREATE OBJECT l_interface_parameters

EXPORTING

i_interface = l_interface.

l_parameters_table = l_interface_parameters->get_parameters_table(

c_true ).

IF NOT l_parameters_table IS INITIAL.

LOOP AT l_parameters_table INTO l_parameter.

IF l_parameter-ddic_dfies-datatype EQ 'CURR' OR

l_parameter-ddic_dfies-datatype EQ 'QUAN'.

l_value-name = l_parameter-name.

APPEND l_value TO l_value_tab.

ENDIF.

ENDLOOP.

ENDIF.

IF NOT l_value_tab IS INITIAL.

DESCRIBE TABLE l_value_tab[] LINES form_info-ref_count.

ENDIF.

ENDFORM. " get_interface_info

*&---------------------------------------------------------------------*

*& Form get_version

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM get_version .

DATA: l_interface_info TYPE tfpversinterface,

wa_interface_info TYPE sfpversinterface,

l_form_info TYPE tfpversform,

wa_form_info TYPE sfpversform.

TRY.

CALL METHOD cl_fp_wb_helper=>form_load_for_version

EXPORTING

i_name = p_form

* I_STATE = 'A'

IMPORTING

e_form = l_form_info

* E_FORMR =

.

CATCH cx_fp_api_usage .

CATCH cx_fp_api_repository .

CATCH cx_fp_api_internal .

ENDTRY.

TRY.

CALL METHOD cl_fp_wb_helper=>interface_load_for_version

EXPORTING

i_name = l_interface_name

* i_state = 'A'

IMPORTING

e_interface = l_interface_info .

CATCH cx_fp_api_usage .

CATCH cx_fp_api_repository .

CATCH cx_fp_api_internal .

ENDTRY.

IF NOT l_form_info[] IS INITIAL.

SORT l_form_info[] BY lastdate lasttime DESCENDING.

READ TABLE l_form_info INDEX 1 INTO wa_form_info.

IF sy-subrc = 0.

form_info-form_name = wa_form_info-name.

form_info-fcreated = wa_form_info-firstuser.

form_info-fcre_date = wa_form_info-firstdate.

form_info-fchanged = wa_form_info-lastuser.

form_info-fchng_date = wa_form_info-lastdate.

form_info-flanguage = wa_form_info-masterlang.

form_info-fpackage = wa_form_info-devclass.

ENDIF.

ENDIF.

IF NOT l_interface_info[] IS INITIAL.

SORT l_interface_info[] BY lastdate lasttime DESCENDING.

READ TABLE l_interface_info INDEX 1 INTO wa_interface_info.

IF sy-subrc = 0.

form_info-interface_name = wa_interface_info-name.

form_info-icreated = wa_interface_info-firstuser.

form_info-icre_date = wa_interface_info-firstdate.

form_info-ichanged = wa_interface_info-lastuser.

form_info-ichng_date = wa_interface_info-lastdate.

form_info-ilanguage = wa_interface_info-masterlang.

form_info-ipackage = wa_interface_info-devclass.

ENDIF.

ENDIF.

ENDFORM. " get_version

*&---------------------------------------------------------------------*

*& Form parse_layout

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM parse_layout .

SELECT SINGLE * FROM fplayoutt

INTO l_form_layout

WHERE name = p_form AND

language = l_language.

l_xstring = l_form_layout-layout.

CALL FUNCTION 'CRM_IC_XML_XSTRING2STRING'

EXPORTING

inxstring = l_xstring

IMPORTING

outstring = outstring.

*-- parse the document

DATA: mini_parser TYPE REF TO if_ixml_mini_parser.

mini_parser = cl_ixml_mini=>create_parser( ).

mini_parser->unprettyprint = 1.

CALL METHOD mini_parser->parse_string

EXPORTING

stream = outstring

IMPORTING

dom = dom

EXCEPTIONS

internal_error = 1

parse_error = 2

OTHERS = 3.

*-- errors?

CASE sy-subrc.

WHEN 0.

WHEN 1.

" print parse errors: table mini_parser->errors

RETURN.

WHEN OTHERS.

RETURN.

ENDCASE.

ENDFORM. " parse_layout

*&---------------------------------------------------------------------*

*& Form get_nodeinfo

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->NODE text

*----------------------------------------------------------------------*

FORM get_nodeinfo

USING node TYPE REF TO if_ixml_mini_node.

DATA : curchild TYPE REF TO if_ixml_mini_node.

* current node's name

DATA : nodename TYPE string,

nodevalue TYPE string,

nodetype TYPE i,

index TYPE i VALUE 1,

attname TYPE string,

attvalue TYPE string.

* check parameters

IF node IS INITIAL.

RETURN.

ENDIF.

* get name

nodename = node->get_name( ).

nodetype = node->get_type( ).

gid = node->get_gid( ).

IF nodetype = if_ixml_mini_node=>co_node_text.

nodevalue = node->get_value( ).

ENDIF.

PERFORM tag_open USING nodename.

* loop though all attributes

DO.

* Get attribute

CALL METHOD node->get_attribute

EXPORTING

index = index

IMPORTING

name = attname

value = attvalue

EXCEPTIONS

OTHERS = 1.

IF sy-subrc = 0.

PERFORM tag_value USING nodename index attname attvalue.

ELSE.

IF nodename = '#text'.

PERFORM tag_value USING nodename ' ' ' ' nodevalue.

ENDIF.

EXIT. " DO loop

ENDIF.

index = index + 1.

ENDDO.

curchild = node->get_first_child( ).

WHILE NOT curchild IS INITIAL.

PERFORM get_nodeinfo USING curchild.

curchild = curchild->get_next( ).

ENDWHILE.

PERFORM tag_close USING nodename.

ENDFORM. "get_nodeinfo

*&---------------------------------------------------------------------*

*& Form tag_open

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->NAME text

*----------------------------------------------------------------------*

FORM tag_open

USING name TYPE string.

IF name = 'field'.

fldflag = 'X'.

fv_flag = 'V'.

ENDIF.

IF name = 'draw'.

fdnode_flag = 'X'.

ENDIF.

IF name = 'value'.

fvnode_flag = 'X'.

ENDIF.

IF name = 'caption'.

fc_flag = 'X'.

fv_flag = 'C'.

ENDIF.

IF name = 'script' AND ( fldflag = 'X' OR fdnode_flag = 'X' ).

wa_element-script = 'Exists'.

scr_flag = 'X'.

ENDIF.

IF name = 'subform'.

sf_flag = 'X'.

ENDIF.

IF name = 'picture'.

dp_flag = 'X'.

ENDIF.

IF name = 'pageArea'.

mpage = 'X'.

ENDIF.

IF name = 'speak'.

speak_flg = 'X'.

ENDIF.

IF name = 'exData'.

exdata_flg = 'X'.

ENDIF.

IF name = 'text'.

txt_flg = 'X'.

ENDIF.

IF name = 'desc'.

desc_flg = 'X'.

ENDIF.

IF name = 'para'.

para_flg = 'X'.

ENDIF.

IF name = 'margin'.

margin_flg = 'X'.

ENDIF.

IF name = 'bind'.

bind_flg = 'X'.

ENDIF.

IF name = 'line' OR name = 'arc' OR name = 'rectangle'.

line_flg = 'X'.

ENDIF.

CASE name.

WHEN 'textEdit'.

IF NOT fdnode_flag = 'X'.

wa_element-ftype = 'Text Field' .

ELSE.

wa_element-ftype = 'Static text' .

ENDIF.

WHEN 'dateTimeEdit'.

wa_element-ftype = 'Date/Time Field' .

WHEN 'numericEdit'.

wa_element-ftype = 'Numeric Field' .

WHEN 'decimal'.

wa_element-ftype = 'Decimal Field' .

WHEN 'barcode' .

wa_element-ftype = 'Barcode'.

WHEN 'imageEdit'.

wa_element-ftype = 'Image Field'.

WHEN 'checkButton' .

wa_element-ftype = 'Check box'.

WHEN 'exclGroup' .

wa_element-ftype = 'Radio Button'.

ENDCASE.

ENDFORM. "tag_open

*&---------------------------------------------------------------------*

*& Form tag_close

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->NAME text

*----------------------------------------------------------------------*

FORM tag_close

USING name TYPE string.

STATICS findex TYPE i.

IF NOT fldflag IS INITIAL.

CASE name.

WHEN 'field'.

findex = findex + 1.

wa_element-findex = findex.

IF wa_element-vfsize IS INITIAL.

IF NOT wa_element-vfont IS INITIAL.

wa_element-vfsize = '10pt'.

ENDIF.

ENDIF.

IF wa_element-cfsize IS INITIAL.

IF NOT wa_element-caption IS INITIAL AND NOT wa_element-cfont IS INITIAL

.

wa_element-cfsize = '10pt'.

ENDIF.

ENDIF.

IF wa_element-visible IS INITIAL.

wa_element-visible = 'Visible'.

wa_final-flg_visible = 'X'.

ENDIF.

IF wa_element-acc_prio = 'toolTip'.

wa_element-acc_value = tt_text.

CLEAR : tt_text.

ENDIF.

IF wa_element-acc_prio = 'caption'.

wa_element-acc_value = wa_element-caption.

ENDIF.

IF wa_element-acc_prio = 'name'.

wa_element-acc_value = wa_element-name.

ENDIF.

IF wa_element-acc_prio IS INITIAL.

wa_element-acc_prio = 'Custom Text'.

ENDIF.

IF wa_element-locale IS INITIAL.

wa_element-locale = 'Default locale'.

ENDIF.

IF wa_element-locale = 'ambient'.

wa_element-locale = 'Viewers system locale'.

ENDIF.

IF wa_element-atype IS INITIAL.

wa_element-atype = 'User Entered -Optional'.

ENDIF.

IF wa_element-vpvalign IS INITIAL.

wa_element-vpvalign = 'Top'.

ENDIF.

PERFORM change_val USING t_space CHANGING tcindentl .

PERFORM change_val USING t_space CHANGING tcindentr .

PERFORM change_val USING 'I' CHANGING tcindentt .

PERFORM change_val USING space CHANGING tvindentl .

PERFORM change_val USING space CHANGING tvindentr .

PERFORM change_val USING 'I' CHANGING tvindentt .

PERFORM change_val USING t_space CHANGING tcspacinga .

PERFORM change_val USING t_space CHANGING tcspacingb .

PERFORM change_val USING 'S' CHANGING tcspacingl .

PERFORM change_val USING t_space CHANGING tvspacinga .

PERFORM change_val USING t_space CHANGING tvspacingb .

PERFORM change_val USING 'S' CHANGING tvspacingl .

IF NOT wa_element-caption IS INITIAL.

IF wa_element-cpvalign IS INITIAL AND wa_element-ftype ne 'Static text'.

wa_element-cpvalign = 'Top'.

ENDIF.

CONCATENATE tcindentl tcindentr tcindentt INTO wa_element-cindent

SEPARATED BY '/'.

CONCATENATE tcspacinga tcspacingb tcspacingl INTO wa_element-cspacing

SEPARATED BY '/'.

ENDIF.

CONCATENATE tvspacinga tvspacingb tvspacingl INTO wa_element-vspacing

SEPARATED BY '/'.

CONCATENATE tvindentl tvindentr tvindentt INTO wa_element-vindent

SEPARATED BY '/'.

CLEAR : tcindentl, tcindentr, tcindentt, tvindentl, tvindentr, tvindentt

.

CLEAR : tcspacinga, tcspacingb, tcspacingl,tvspacinga, tvspacingb,

tvspacingl.

* IF NOT wa_element-caption IS INITIAL.

* IF wa_element-cindent <> '0pt/0pt/None'.

* wa_element-cindent = 'Not Default values'.

* ELSE.

* wa_element-cindent = 'Default values'.

* ENDIF.

* IF wa_element-cspacing <> '0pt/0pt/Single'.

* wa_element-cspacing = 'Not Default values'.

* ELSE.

* wa_element-cspacing = 'Default values'.

* ENDIF.

* ENDIF.

*

* IF wa_element-vindent <> '0pt/0pt/None'.

* wa_element-vindent = 'Not Default values'.

* ELSE.

* wa_element-vindent = 'Default values'.

* ENDIF.

*

* IF wa_element-vspacing <> '0pt/0pt/Single'.

* wa_element-vspacing = 'Not Default values'.

* ELSE.

* wa_element-vspacing = 'Default values'.

* ENDIF.

MOVE-CORRESPONDING wa_element TO wa_final.

IF NOT wa_element-caption IS INITIAL.

IF wa_final-cindent NE '0pt/0pt/None'.

PERFORM change_color USING 'wa_final-cindent' CHANGING wa_final.

ENDIF.

IF wa_final-cspacing NE '0pt/0pt/Single' .

PERFORM change_color USING 'wa_final-cspacing' CHANGING wa_final.

ENDIF.

ENDIF.

IF wa_final-vindent NE '0pt/0pt/None'.

PERFORM change_color USING 'wa_final-vindent' CHANGING wa_final.

ENDIF.

IF wa_final-vspacing NE '0pt/0pt/Single'.

PERFORM change_color USING 'wa_final-vspacing' CHANGING wa_final.

ENDIF.

PERFORM font_check CHANGING wa_final.

PERFORM binding_check CHANGING wa_final.

PERFORM script_check CHANGING wa_final.

PERFORM acc_check CHANGING wa_final.

PERFORM locale_check CHANGING wa_final.

PERFORM default_check CHANGING wa_final.

PERFORM accesstype_check CHANGING wa_final.

PERFORM name_untitled_check CHANGING wa_final.

APPEND wa_final TO it_ftemp.

CLEAR: wa_final, fldflag, lt_color.

"APPEND wa_element TO it_element.

CLEAR: wa_element, fldflag.

ENDCASE.

IF name = 'caption'.

CLEAR fc_flag .

fv_flag = ' ' .

ENDIF.

IF name = 'value'.

CLEAR fvnode_flag.

ENDIF.

IF name = 'picture'.

CLEAR dp_flag .

ENDIF.

ENDIF.

IF name = 'text'.

CLEAR txt_flg.

ENDIF.

IF name = 'desc'.

CLEAR desc_flg .

ENDIF.

IF name = 'bind'.

CLEAR bind_flg .

ENDIF.

IF name = 'para'.

CLEAR para_flg .

ENDIF.

IF name = 'margin'.

CLEAR margin_flg.

ENDIF.

IF NOT fdnode_flag IS INITIAL.

CASE name.

WHEN 'draw'.

findex = findex + 1.

wa_element-findex = findex.

IF wa_element-cfsize IS INITIAL AND NOT wa_element-cfont IS INITIAL.

wa_element-cfsize = '10pt'.

ENDIF.

IF wa_element-visible IS INITIAL.

wa_element-visible = 'Visible'.

ENDIF.

IF wa_element-acc_prio = 'name'.

wa_element-acc_value = wa_element-name.

ENDIF.

IF wa_element-acc_prio = 'toolTip'.

wa_element-acc_value = tt_text.

CLEAR : tt_text.

ENDIF.

IF wa_element-acc_prio IS INITIAL.

wa_element-acc_prio = 'Custom Text'.

ENDIF.

IF wa_element-ftype IS INITIAL AND NOT fdnode_flag IS INITIAL.

wa_element-ftype = 'Static Text'.

ENDIF.

IF wa_element-cpvalign IS INITIAL.

wa_element-cpvalign = 'Top'.

ENDIF.

IF wa_element-vpvalign IS INITIAL.

wa_element-vpvalign = 'Top'.

ENDIF.

PERFORM change_val USING t_space CHANGING tcindentl .

PERFORM change_val USING t_space CHANGING tcindentr .

PERFORM change_val USING 'I' CHANGING tcindentt .

PERFORM change_val USING t_space CHANGING tcspacinga .

PERFORM change_val USING t_space CHANGING tcspacingb .

PERFORM change_val USING 'S' CHANGING tcspacingl .

CONCATENATE tcindentl tcindentr tcindentt INTO wa_element-cindent

SEPARATED BY '/'.

CONCATENATE tcspacinga tcspacingb tcspacingl INTO wa_element-cspacing

SEPARATED BY '/'.

CLEAR : tcindentl, tcindentr, tcindentt.

CLEAR : tcspacinga, tcspacingb, tcspacingl.

* IF wa_element-cindent <> '0pt/0pt/None'.

* wa_element-cindent = 'Not Default values'.

* ELSE.

* wa_element-cindent = 'Default values'.

* ENDIF.

*

* IF wa_element-cspacing <> '0pt/0pt/Single'.

* wa_element-cspacing = 'Not Default values'.

* ELSE.

* wa_element-cspacing = 'Default values'.

* ENDIF.

IF line_flg IS INITIAL.

MOVE-CORRESPONDING wa_element TO wa_final.

IF wa_final-cindent NE '0pt/0pt/None'.

PERFORM change_color USING 'wa_final-cindent' CHANGING wa_final.

ENDIF.

IF wa_final-cspacing NE '0pt/0pt/Single' .

PERFORM change_color USING 'wa_final-cspacing' CHANGING wa_final.

ENDIF.

PERFORM font_check CHANGING wa_final.

PERFORM script_check CHANGING wa_final.

PERFORM acc_check CHANGING wa_final.

PERFORM name_untitled_check CHANGING wa_final.

APPEND wa_final TO it_ftemp.

CLEAR: wa_final, fldflag, lt_color.

"APPEND wa_element TO it_element.

CLEAR: wa_element, fldflag, fdnode_flag.

ELSE.

CLEAR: wa_element, fldflag, fdnode_flag, line_flg.

findex = findex - 1.

ENDIF.

ENDCASE.

ENDIF.

IF name = 'exData'.

CLEAR exdata_flg.

ENDIF.

IF NOT mpage IS INITIAL.

CASE name.

WHEN 'medium'.

IF wa_page-orientation IS INITIAL .

wa_page-orientation = 'Portrait'.

ENDIF.

WHEN 'pageArea'.

APPEND wa_page TO it_page.

CLEAR: wa_page,mpage.

ENDCASE.

ENDIF.

IF name = 'speak'.

CLEAR speak_flg.

ENDIF.

ENDFORM. "tag_close

*&---------------------------------------------------------------------*

*& Form value

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->NODENAME text

* -->INDEX text

* -->NAME text

* -->VALUE text

*----------------------------------------------------------------------*

FORM tag_value

USING nodename TYPE string

index TYPE i

name TYPE string

value TYPE string.

IF NOT fldflag IS INITIAL.

CASE nodename.

WHEN 'field'.

CASE name.

WHEN 'name'.

wa_element-name = value.

WHEN 'w' OR 'minW'.

wa_element-w = value.

WHEN 'h' OR 'minH'.

wa_element-h = value.

WHEN 'x'.

wa_element-x = value.

WHEN 'y'.

wa_element-y = value.

WHEN 'presence'.

wa_element-visible = value.

WHEN 'locale'.

" PERFORM get_locale CHANGING value.

wa_element-locale = value.

WHEN 'access' .

wa_element-atype = value.

WHEN OTHERS.

ENDCASE.

WHEN 'font'.

IF fc_flag IS INITIAL.

IF name = 'typeface'.

wa_element-vfont = value.

ENDIF.

IF name = 'size'.

wa_element-vfsize = value.

ENDIF.

ELSE.

IF name = 'typeface'.

wa_element-cfont = value.

ENDIF.

IF name = 'size'.

wa_element-cfsize = value.

ENDIF.

ENDIF.

WHEN '#text' .

IF exdata_flg IS INITIAL .

IF NOT fc_flag IS INITIAL AND fvnode_flag = 'X'.

wa_element-caption = value.

CLEAR fvnode_flag.

ENDIF.

IF ( fvnode_flag = 'X' AND fc_flag IS INITIAL AND scr_flag IS INITIAL

AND dp_flag IS INITIAL ).

IF desc_flg IS INITIAL AND txt_flg IS INITIAL.

wa_element-default = value.

ENDIF.

CLEAR: fvnode_flag.

ENDIF.

IF fa_flag = 'T'.

tt_text = value.

CLEAR fa_flag.

ENDIF.

IF NOT dp_flag IS INITIAL.

wa_element-dpattern = value.

ENDIF.

IF fa_flag EQ 'A' AND scr_flag IS INITIAL AND desc_flg IS INITIAL AND

txt_flg IS INITIAL.

wa_element-acc_value = value.

CLEAR fa_flag.

ENDIF.

IF fa_flag EQ 'C' AND scr_flag IS INITIAL AND desc_flg IS INITIAL AND

txt_flg IS INITIAL.

wa_element-acc_value = value.

CLEAR fa_flag.

ENDIF.

ENDIF.

WHEN 'speak' .

CASE name.

WHEN 'priority'.

wa_element-acc_prio = value.

fa_flag = 'A'.

WHEN 'disable'.

wa_element-acc_prio = 'None'.

WHEN 'name' .

wa_element-acc_prio = 'Name'.

WHEN OTHERS.

fa_flag = 'C'.

ENDCASE.

WHEN 'toolTip' .

fa_flag = 'T'.

WHEN 'bind' .

CHECK name = 'match' .

CHECK value NE 'none'.

wa_element-binding = 'Exists'.

WHEN 'calculate'.

IF name = 'override' AND value = 'error'.

wa_element-atype = 'Calculated - Read Only'.

ENDIF.

IF name = 'override' AND value = 'warning'.

wa_element-atype = 'Calculated - User Can Override'.

ENDIF.

WHEN 'validate'.

IF name = 'nullTest' AND value = 'error'.

wa_element-atype = 'User Entered - Required'.

ENDIF.

IF name = 'nullTest' AND value = 'warning'.

wa_element-atype = 'User Entered - Recommended'.

ENDIF.

WHEN 'para'.

CASE name.

WHEN 'marginLeft'.

IF NOT fc_flag IS INITIAL.

tcindentl = value.

ELSE.

tvindentl = value.

ENDIF.

WHEN 'marginRight'.

IF NOT fc_flag IS INITIAL.

tcindentr = value.

ELSE.

tvindentr = value.

ENDIF.

WHEN 'textIndent'.

IF NOT fc_flag IS INITIAL.

tcindentt = value.

ELSE.

tvindentt = value.

ENDIF.

WHEN 'spaceAbove'.

IF NOT fc_flag IS INITIAL.

tcspacinga = value.

ELSE.

tvspacinga = value.

ENDIF.

WHEN 'spaceBelow'.

IF NOT fc_flag IS INITIAL.

tcspacingb = value.

ELSE.

tvspacingb = value.

ENDIF.

WHEN 'lineHeight'.

IF NOT fc_flag IS INITIAL.

tcspacingl = value.

ELSE.

tvspacingl = value.

ENDIF.

WHEN 'vAlign'.

IF NOT fc_flag IS INITIAL.

wa_element-cpvalign = value.

ELSE.

wa_element-vpvalign = value.

ENDIF.

ENDCASE.

WHEN 'margin'.

CASE name.

WHEN 'bottomInset'.

wa_element-bmargin = value.

WHEN 'leftInset'.

wa_element-lmargin = value.

WHEN 'rightInset'.

wa_element-rmargin = value.

WHEN 'topInset'.

wa_element-tmargin = value.

ENDCASE.

ENDCASE.

ENDIF.

IF NOT fdnode_flag IS INITIAL.

CASE nodename.

WHEN 'draw'.

CASE name.

WHEN 'name'.

wa_element-name = value.

WHEN 'w' OR 'minW'.

wa_element-w = value.

WHEN 'h' OR 'minH'.

wa_element-h = value.

WHEN 'x'.

wa_element-x = value.

WHEN 'y'.

wa_element-y = value.

WHEN 'presence'.

wa_element-visible = value.

WHEN OTHERS.

ENDCASE.

WHEN 'speak' .

CASE name.

WHEN 'priority'.

wa_element-acc_prio = value.

fa_flag = 'A'.

WHEN 'disable'.

wa_element-acc_prio = 'None'.

WHEN 'name' .

wa_element-acc_prio = 'Name'.

WHEN OTHERS.

fa_flag = 'C'.

ENDCASE.

WHEN '#text'.

IF fa_flag = 'T'.

tt_text = value.

CLEAR fa_flag.

ENDIF.

CHECK speak_flg NE space.

IF fa_flag = 'T'.

tt_text = value.

CLEAR fa_flag.

ENDIF.

IF fa_flag EQ 'A' AND scr_flag IS INITIAL.

wa_element-acc_value = value.

CLEAR fa_flag.

ENDIF.

IF fa_flag EQ 'C'.

wa_element-acc_value = value.

CLEAR fa_flag.

ENDIF.

WHEN 'toolTip' .

fa_flag = 'T'.

WHEN 'font'.

IF name = 'typeface'.

wa_element-cfont = value.

ENDIF.

IF name = 'size'.

wa_element-cfsize = value.

ENDIF.

WHEN 'para'.

CASE name.

WHEN 'marginLeft'.

tcindentl = value.

WHEN 'marginRight'.

tcindentr = value.

WHEN 'textIndent'.

tcindentt = value.

WHEN 'spaceAbove'.

tcspacinga = value.

WHEN 'spaceBelow'.

tcspacingb = value.

WHEN 'lineHeight'.

tcspacingl = value.

WHEN 'vAlign'.

wa_element-cpvalign = value.

ENDCASE.

WHEN 'margin'.

CASE name.

WHEN 'bottomInset'.

wa_element-bmargin = value.

WHEN 'leftInset'.

wa_element-lmargin = value.

WHEN 'rightInset'.

wa_element-rmargin = value.

WHEN 'topInset'.

wa_element-tmargin = value.

ENDCASE.

ENDCASE.

ENDIF.

STATICS : formlocale.

IF NOT sf_flag IS INITIAL.

CASE name.

WHEN 'layout'.

IF value = 'tb'.

lflag = 'X'.

ENDIF.

WHEN 'locale'.

IF NOT lflag IS INITIAL.

PERFORM get_locale CHANGING value.

IF formlocale IS INITIAL.

form_info-form_locale = value.

formlocale = 1.

ENDIF.

ENDIF.

ENDCASE.

ENDIF.

IF NOT mpage IS INITIAL.

CASE nodename.

WHEN 'pageArea'.

IF name = 'name'.

wa_page-name = value.

ENDIF.

WHEN 'medium'.

CASE name.

WHEN 'stock'.

wa_page-pageformat = value.

WHEN 'orientation' .

wa_page-orientation = value.

pmedium = 'X'.

ENDCASE.

ENDCASE.

ENDIF.

ENDFORM. "value

*&---------------------------------------------------------------------*

*& Form get_locale

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->P_VALUE text

*----------------------------------------------------------------------*

FORM get_locale CHANGING p_value.

CASE p_value.

WHEN 'ar_DZ'.

p_value = 'Arabic (Algeria)'.

WHEN 'ar_BH'.

p_value = 'Arabic (Bahrain)'.

WHEN 'ar_EG'.

p_value = 'Arabic (Egypt)'.

WHEN 'ar_JO'.

p_value = 'Arabic (Jordan)'.

WHEN 'ar_IQ'.

p_value = 'Arabic (Iraq)'.

WHEN 'ar_KW'.

p_value = 'Arabic (Kuwait)'.

WHEN 'ar_LB'.

p_value = 'Arabic (Lebanon)'.

WHEN 'ar_LY'.

p_value = 'Arabic (Libya)'.

WHEN 'ar_MA'.

p_value = 'Arabic (Morocco)'.

WHEN 'ar_OM'.

p_value = 'Arabic (Oman)'.

WHEN 'ar_QA'.

p_value = 'Arabic (Qatar)'.

WHEN 'ar_SA'.

p_value = 'Arabic (Saudi Arabia)'.

WHEN 'ar_SD'.

p_value = 'Arabic (Sudan)'.

WHEN 'ar_SY'.

p_value = 'Arabic (Syria)'.

WHEN 'ar_TN'.

p_value = 'Arabic (Tunisia)'.

WHEN 'ar_AE'.

p_value = 'Arabic (United Arab Emirates)'.

WHEN 'Yemen'.

p_value = 'Arabic (Yemen)'.

WHEN 'bg_BG'.

p_value = 'Bulgarian (Bulgaria)'.

WHEN 'zh_CN'.

p_value = 'Chinese (China)'.

WHEN 'zh_HK'.

p_value = 'Chinese (Hong Kong)'.

WHEN 'zh_TW'.

p_value = 'Chinese (Taiwan)'.

WHEN 'hr_HR'.

p_value = 'Croatian (Croatia)'.

WHEN 'cs_CZ'.

p_value = 'Czech (Czech Republic)'.

WHEN 'da_DK'.

p_value = 'Danish (Denmark)'.

WHEN 'nl_BE'.

p_value = 'Dutch (Belgium)'.

WHEN 'nl_NL'.

p_value = 'Dutch (Netherlands)'.

WHEN 'en_AU'.

p_value = 'English (Australia)'.

WHEN 'en_CA'.

p_value = 'English (Canada)'.

WHEN 'en_IN'.

p_value = 'English (India)'.

WHEN 'en_IE'.

p_value = 'English (Ireland)'.

WHEN 'en_NZ'.

p_value = 'English (New Zealand)'.

WHEN 'en_ZA'.

p_value = 'English (South Africa)'.

WHEN 'en_GB'.

p_value = 'English (United Kingdom)'.

WHEN 'en_GB_EURO'.

p_value = 'English (United Kingdom Euro)'.

WHEN 'en_US'.

p_value = 'English (USA)'.

WHEN 'et_EE'.

p_value = 'Estonian (Estonia)'.

WHEN 'fi_FI'.

p_value = 'Finnish (Finland)'.

WHEN 'fr_BE'.

p_value = 'French (Belgium)'.

WHEN 'fr_CA'.

p_value = 'French (Canada)'.

WHEN 'fr_FR'.

p_value = 'French (France)'.

WHEN 'fr_LU'.

p_value = 'French (Luxembourg)'.

WHEN 'fr_CH'.

p_value = 'French (Switzerland)'.

WHEN 'de_AT'.

p_value = 'German (Austria)'.

WHEN 'de_DE'.

p_value = 'German (Germany)'.

WHEN 'de_LU'.

p_value = 'German (Luxembourg)'.

WHEN 'de_CH'.

p_value = 'German (Switzerland)'.

WHEN 'el_GR'.

p_value = 'Greek (Greece)'.

WHEN 'he_IL'.

p_value = 'Hebrew (Israel)'.

WHEN 'hu_HU'.

p_value = 'Hungarian (Hungary)'.

WHEN 'id_ID'.

p_value = 'Indonesian (Indonesia)'.

WHEN 'it_IT'.

p_value = 'Italian (Italy)'.

WHEN 'it_CH'.

p_value = 'Italian (Switzerland)'.

WHEN 'ja_JP'.

p_value = 'Japanese (Japan)'.

WHEN 'ko_KR'.

p_value = 'Korean (Korea)'.

WHEN 'ko_KR_HANI'.

p_value = 'Korean (Korea Hanja)'.

WHEN 'lv_LV'.

p_value = 'Latvian (Latvia)'.

WHEN 'lt_LT'.

p_value = 'Lithuanian (Lithuania)'.

WHEN 'ms_MY'.

p_value = 'Malay (Malaysia)'.

WHEN 'nb_NO'.

p_value = 'Norwegian-Bokmal (Norway)'.

WHEN 'nn_NO'.

p_value = 'Norwegian-Nynorsk (Norway)'.

WHEN 'pl_PL'.

p_value = 'Polish (Poland)'.

WHEN 'pt_BR'.

p_value = 'Portuguese (Brazil)'.

WHEN 'pt_PT'.

p_value = 'Portuguese (Portugal)'.

WHEN 'ro_RO'.

p_value = 'Romanian (Romania)'.

WHEN 'ru_RU'.

p_value = 'Russian (Russia)'.

WHEN 'sh_BA'.

p_value = 'Serbo-Croatian (Bosnia and Herzegovina)'.

WHEN 'sh_HR'.

p_value = 'Serbo-Croatian (Croatia)'.

WHEN 'sh_CS'.

p_value = 'Serbo-Croatian (Serbia and Montenegro)'.

WHEN 'sk_SK'.

p_value = 'Slovak (Slovakia)'.

WHEN 'sl_SI'.

p_value = 'Slovenian (Slovakia)'.

WHEN 'es_AR'.

p_value = 'Spanish (Argentina)'.

WHEN 'es_BO'.

p_value = 'Spanish (Bolivia)'.

WHEN 'es_CL'.

p_value = 'Spanish (Chile)'.

WHEN 'es_CO'.

p_value = 'Spanish (Colombia)'.

WHEN 'es_CR'.

p_value = 'Spanish (Costa Rica)'.

WHEN 'es_DO'.

p_value = 'Spanish (Dominican Republic)'.

WHEN 'es_EC'.

p_value = 'Spanish (Ecuador)'.

WHEN 'es_SV'.

p_value = 'Spanish (El Salvador)'.

WHEN 'es_GT'.

p_value = 'Spanish (Guatemala)'.

WHEN 'es_HN'.

p_value = 'Spanish (Honduras)'.

WHEN 'es_MX'.

p_value = 'Spanish (Mexico)'.

WHEN 'es_NI'.

p_value = 'Spanish (Nicaragua)'.

WHEN 'es_PA'.

p_value = 'Spanish (Panama)'.

WHEN 'es_PY'.

p_value = 'Spanish (Paraguay)'.

WHEN 'es_PE'.

p_value = 'Spanish (Peru)'.

WHEN 'es_PR'.

p_value = 'Spanish (Puerto Rico)'.

WHEN 'es_ES'.

p_value = 'Spanish (Spain)'.

WHEN 'es_UY'.

p_value = 'Spanish (Uruguay)'.

WHEN 'es_VE'.

p_value = 'Spanish (Venezuela)'.

WHEN 'sv_SE'.

p_value = 'Swedish (Sweden)'.

WHEN 'th_TH'.

p_value = 'Thai (Thailand)'.

WHEN 'th_TH_TH'.

p_value = 'Thai (Thailand Traditional)'.

WHEN 'tr_TR'.

p_value = 'Turkish (Turkey)'.

WHEN 'uk_UA'.

p_value = 'Ukrainian (Ukraine)'.

WHEN 'vi_VN'.

p_value = 'Vietnamese (Vietnam)'.

WHEN 'ambient' .

p_value = 'Viewers system locale'.

WHEN OTHERS.

p_value = p_value.

ENDCASE.

ENDFORM. " get_locale

*&---------------------------------------------------------------------*

*& Form alv_dispaly

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM alv_dispaly .

DATA: lr_content TYPE REF TO cl_salv_form_element.

TRY.

cl_salv_table=>factory(

IMPORTING

r_salv_table = gr_table

CHANGING

t_table = it_final ).

CATCH cx_salv_msg. "#EC NO_HANDLER

ENDTRY.

*... §3 Functions

DATA: lr_functions TYPE REF TO cl_salv_functions_list.

lr_functions = gr_table->get_functions( ).

*... §3.1 activate ALV generic Functions

lr_functions->set_all( gc_true ).

PERFORM top_of_page USING space CHANGING lr_content.

gr_table->set_top_of_list( lr_content ).

PERFORM set_names_columns.

gr_table->display( ).

ENDFORM. " alv_dispaly

*&---------------------------------------------------------------------*

*& Form top_of_page

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->I_PRINT text

* -->CR_CONTENT text

*----------------------------------------------------------------------*

FORM top_of_page USING i_print TYPE sap_bool

CHANGING cr_content TYPE REF TO cl_salv_form_element.

DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid,

lr_label TYPE REF TO cl_salv_form_label,

lr_text TYPE REF TO cl_salv_form_text,

lr_flow TYPE REF TO cl_salv_form_layout_flow.

CREATE OBJECT lr_grid.

lr_label = lr_grid->create_label(

row = 1

column = 3

text = 'Form' ).

lr_label = lr_grid->create_label(

row = 1

column = 5

text = 'Interface' ).

lr_label = lr_grid->create_label(

row = 2

column = 1

text = 'Name : ' ).

lr_text = lr_grid->create_text(

row = 2

column = 3

text = form_info-form_name ).

lr_label = lr_grid->create_label(

row = 3

column = 1

text = 'Created : ' ).

lr_text = lr_grid->create_text(

row = 3

column = 3

text = form_info-fcreated ).

lr_label = lr_grid->create_label(

row = 4

column = 1

text = 'Created Date : ' ).

lr_text = lr_grid->create_text(

row = 4

column = 3

text = form_info-fcre_date ).

lr_label = lr_grid->create_label(

row = 5

column = 1

text = 'Changed : ' ).

lr_text = lr_grid->create_text(

row = 5

column = 3

text = form_info-fchanged ).

lr_label = lr_grid->create_label(

row = 6

column = 1

text = 'Changed Date : ' ).

lr_text = lr_grid->create_text(

row = 6

column = 3

text = form_info-fchng_date ).

lr_label = lr_grid->create_label(

row = 7

column = 1

text = 'Original Language : ' ).

lr_text = lr_grid->create_text(

row = 7

column = 3

text = form_info-flanguage ).

lr_label = lr_grid->create_label(

row = 8

column = 1

text = 'Package : ' ).

lr_text = lr_grid->create_text(

row = 8

column = 3

text = form_info-fpackage ).

lr_text = lr_grid->create_text(

row = 2

column = 5

text = form_info-interface_name ).

lr_text = lr_grid->create_text(

row = 3

column = 5

text = form_info-icreated ).

lr_text = lr_grid->create_text(

row = 4

column = 5

text = form_info-icre_date ).

lr_text = lr_grid->create_text(

row = 5

column = 5

text = form_info-ichanged ).

lr_text = lr_grid->create_text(

row = 6

column = 5

text = form_info-ichng_date ).

lr_text = lr_grid->create_text(

row = 7

column = 5

text = form_info-ilanguage ).

lr_text = lr_grid->create_text(

row = 8

column = 5

text = form_info-ipackage ).

lr_label = lr_grid->create_label(

row = 1

column = 7

text = 'Master Page Information' ).

DATA: pcnt TYPE i,

cntr TYPE i VALUE 2,

minfo TYPE string.

IF NOT it_page IS INITIAL.

DESCRIBE TABLE it_page LINES pcnt.

LOOP AT it_page INTO wa_page.

CONCATENATE wa_page-name '' wa_page-pageformat '' wa_page-orientation

INTO minfo SEPARATED BY space.

lr_text = lr_grid->create_text(

row = cntr

column = 7

text = minfo ).

cntr = cntr + 1.

ENDLOOP.

ENDIF.

lr_label = lr_grid->create_label(

row = 1

column = 9

text = 'Other Information' ).

IF form_info-interface_type = 'S' .

lr_text = lr_grid->create_text(

row = 2

column = 9

text = 'Smart forms-compatible Interface' ).

ENDIF.

IF form_info-interface_type IS INITIAL .

lr_text = lr_grid->create_text(

row = 2

column = 9

text = 'ABAP Dictionary-Based Interface' ).

ENDIF.

DATA: ref_msg TYPE string.

IF form_info-ref_count NE 0.

CONCATENATE 'Interface import parameters contains ' form_info-ref_count

'Currency / Quantity fields' INTO ref_msg SEPARATED BY space.

ELSE.

ref_msg =

'Interface import parameters contains 0 Currency / Quantity fields '.

ENDIF.

lr_text = lr_grid->create_text(

row = 3

column = 9

text = ref_msg ).

DATA: locale_msg TYPE string.

IF form_info-form_locale IS INITIAL.

form_info-form_locale = 'Viewers system locale'.

ENDIF.

CONCATENATE 'Form default locale set as "' form_info-form_locale '"'

INTO locale_msg SEPARATED BY space.

lr_text = lr_grid->create_text(

row = 4

column = 9

text = locale_msg ).

cr_content = lr_grid.

ENDFORM. " top_of_page

*&---------------------------------------------------------------------*

*& Form set_names_columns

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM set_names_columns .

DATA: lr_columns TYPE REF TO cl_salv_columns_table,

lr_column TYPE REF TO cl_salv_column_table,

lr_column1 TYPE REF TO cl_salv_column.

lr_columns = gr_table->get_columns( ).

lr_columns->set_optimize( gc_true ).

lr_columns->set_key_fixation( 'X' ).

TRY.

lr_columns->set_color_column( 'T_COLOR' ).

CATCH cx_salv_data_error.

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'LIGHT' ).

lr_column->set_long_text( ' ' ).

lr_column->set_key( 'X' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_columns->set_exception_column( 'LIGHT' ).

CATCH cx_salv_data_error. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'FINDEX' ).

lr_column->set_long_text( 'Index' ).

lr_column->set_key( 'X' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'NAME' ).

lr_column->set_long_text( 'Field Name' ).

lr_column->set_key( 'X' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'FTYPE' ).

lr_column->set_long_text( 'Field Type' ).

lr_column->set_key( 'X' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CAPTION' ).

lr_column->set_long_text( 'Caption' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'X' ).

lr_column->set_long_text( 'X' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'X' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'Y' ).

lr_column->set_long_text( 'Y' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'Y' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'H' ).

lr_column->set_long_text( 'H' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'W' ).

lr_column->set_long_text( 'W' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CFONT' ).

lr_column->set_long_text( 'Font(Caption/Static Text)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_CFONT' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CFSIZE' ).

lr_column->set_long_text( 'Size(Caption/Static Text)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_CFSIZE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CPVALIGN' ).

lr_column->set_long_text( 'V.Alignment(Caption/Static Text)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CINDENT' ).

lr_column->set_long_text( 'Indent(Caption/Static Text)L/R/First' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'CSPACING' ).

lr_column->set_long_text( 'Spacing(Caption/Static Text)A/B/L.S' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VPVALIGN' ).

lr_column->set_long_text( 'V.Align(Value)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VINDENT' ).

lr_column->set_long_text( 'Indent(Value)L/R/First' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VSPACING' ).

lr_column->set_long_text( 'Spacing(Value)A/B/L.S' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'LMARGIN' ).

lr_column->set_long_text( 'Left Margin' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'RMARGIN' ).

lr_column->set_long_text( 'Right Margin' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'TMARGIN' ).

lr_column->set_long_text( 'Top Margin' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'BMARGIN' ).

lr_column->set_long_text( 'Bottom Margin' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VFONT' ).

lr_column->set_long_text( 'Font(Value)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_VFONT' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VFSIZE' ).

lr_column->set_long_text( 'Size(Value)' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_VFSIZE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'DPATTERN' ).

lr_column->set_long_text( 'Dispaly Pattern' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_DPATTERN' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'ACC_PRIO' ).

lr_column->set_long_text( 'Acc.Priority' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_ACC_PRIO' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'ACC_VALUE' ).

lr_column->set_long_text( 'Acc.Value' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_ACC_VALUE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'VISIBLE' ).

lr_column->set_long_text( 'Appearance' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_VISIBLE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'SCRIPT' ).

lr_column->set_long_text( 'Script' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_SCRIPT' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'DEFAULT' ).

lr_column->set_long_text( 'Default Value' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_DEFAULT' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'BINDING' ).

lr_column->set_long_text( 'Binding' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_BINDING' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'LOCALE' ).

lr_column->set_long_text( 'Locale' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_LOCALE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column ?= lr_columns->get_column( 'ATYPE' ).

lr_column->set_long_text( 'Access Type' ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

TRY.

lr_column1 ?= lr_columns->get_column( 'FLG_ATYPE' ).

lr_column1->set_technical( abap_true ).

CATCH cx_salv_not_found. "#EC NO_HANDLER

ENDTRY.

ENDFORM. " set_names_columns

*&---------------------------------------------------------------------*

*& Form font_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM font_check CHANGING p_wa_final TYPE wa_final.

IF p_wa_final-visible = 'Visible'.

IF NOT p_wa_final-caption IS INITIAL.

IF NOT p_wa_final-cfont IS INITIAL.

IF NOT ( p_wa_final-cfont = 'Arial' ).

p_wa_final-flg_cfont = 'X'.

p_wa_final-light = '1'.

ls_color-fname = 'CFONT'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDIF.

ELSEIF ( p_wa_final-ftype = 'Static text' OR p_wa_final-ftype = '' ) .

IF NOT ( p_wa_final-cfont = 'Arial' ).

p_wa_final-flg_cfont = 'X'.

p_wa_final-light = '1'.

ls_color-fname = 'CFONT'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDIF.

ENDIF.

IF NOT ( wa_element-vfont = 'Arial' ).

CHECK wa_element-vfont NE space.

p_wa_final-flg_vfont = 'X'.

p_wa_final-light = '1'.

ls_color-fname = 'VFONT'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDFORM. " font_check

*&---------------------------------------------------------------------*

*& Form binding_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM binding_check CHANGING p_wa_final TYPE wa_final.

IF p_wa_final-binding IS INITIAL.

p_wa_final-flg_binding = 'X'.

ENDIF.

ENDFORM. " binding_check

*&---------------------------------------------------------------------*

*& Form script_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM script_check CHANGING p_wa_final TYPE wa_final.

IF NOT p_wa_final-script IS INITIAL.

p_wa_final-flg_script = 'X'.

ENDIF.

ENDFORM. " script_check

*&---------------------------------------------------------------------*

*& Form locale_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->P_WA_FINAL text

*----------------------------------------------------------------------*

FORM locale_check CHANGING p_wa_final TYPE wa_final.

DATA : temp_locale TYPE string.

IF l_local EQ 'NO'.

l_local = 'Default locale'.

ELSE.

temp_locale = l_local+0(2).

ENDIF.

TRANSLATE temp_locale TO LOWER CASE.

REPLACE SECTION OFFSET 0 LENGTH 2 OF l_local WITH temp_locale IN

character mode.

CLEAR: value, temp_locale.

IF p_wa_final-ftype EQ 'Decimal Field' OR

p_wa_final-ftype EQ 'Date/Time Field' .

"OR p_wa_final-ftype EQ 'Numeric Field'.

IF p_wa_final-locale NE l_local.

p_wa_final-flg_locale = 'X'.

p_wa_final-light = 1.

ls_color-fname = 'LOCALE'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ELSEIF p_wa_final-ftype EQ 'Numeric Field'

OR p_wa_final-ftype EQ 'Text Field'.

IF p_wa_final-locale NE 'Default locale' .

IF p_wa_final-locale NE l_local .

p_wa_final-flg_locale = 'X'.

p_wa_final-light = 1.

ls_color-fname = 'LOCALE'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDIF.

ENDIF.

PERFORM get_locale CHANGING p_wa_final-locale.

ENDFORM. "locale_check

*&---------------------------------------------------------------------*

*& Form default_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->P_WA_FINAL text

*----------------------------------------------------------------------*

FORM default_check CHANGING p_wa_final TYPE wa_final.

IF NOT p_wa_final-default IS INITIAL.

p_wa_final-light = 1.

ls_color-fname = 'DEFAULT'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDFORM. "default_check

*&---------------------------------------------------------------------*

*& Form change_color

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->P_TINS text

* -->P_WA_FINAL text

*----------------------------------------------------------------------*

FORM change_color USING p_tins

CHANGING p_wa_final TYPE wa_final.

DATA: temp TYPE string,

temp1 TYPE string.

SPLIT p_tins AT '-' INTO temp1 temp IN CHARACTER MODE.

TRANSLATE temp TO UPPER CASE.

p_wa_final-light = 1.

ls_color-fname = temp.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDFORM. " change_color

*&---------------------------------------------------------------------*

*& Form acc_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM acc_check CHANGING p_wa_final TYPE wa_final.

CASE p_wa_final-ftype.

WHEN 'Static text'.

IF NOT p_wa_final-acc_prio EQ 'None'.

p_wa_final-flg_acc_value = 'X'.

p_wa_final-light = 2.

ls_color-fname = 'ACC_PRIO'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

WHEN OTHERS.

IF p_wa_final-acc_value IS INITIAL AND p_wa_final-acc_prio NE 'None'.

p_wa_final-flg_acc_value = 'X'.

p_wa_final-light = 1.

ls_color-fname = 'ACC_VALUE'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ELSE.

CASE p_wa_final-acc_prio.

WHEN 'Custom Text'.

IF p_wa_final-acc_value IS INITIAL.

p_wa_final-flg_acc_value = 'X'.

ls_color-fname = 'ACC_PRIO'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

WHEN 'toolTip' .

IF p_wa_final-acc_value IS INITIAL.

p_wa_final-flg_acc_value = 'X'.

ls_color-fname = 'ACC_PRIO'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

WHEN 'caption' .

IF p_wa_final-acc_value IS INITIAL.

p_wa_final-flg_acc_value = 'X'.

ls_color-fname = 'ACC_PRIO'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

WHEN 'name'.

p_wa_final-flg_acc_value = 'X'.

p_wa_final-light = 1.

ls_color-fname = 'ACC_VALUE'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDCASE.

ENDIF.

ENDCASE.

ENDFORM. " acc_check

*&---------------------------------------------------------------------*

*& Form accesstype_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM accesstype_check CHANGING p_wa_final TYPE wa_final.

IF p_wa_final-atype NE 'readOnly'.

p_wa_final-flg_atype = 'X'.

p_wa_final-light = 1.

ls_color-fname = 'ATYPE'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDFORM. " accesstype_check

*&---------------------------------------------------------------------*

*& Form name_untitled_check

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <--P_WA_FINAL text

*----------------------------------------------------------------------*

FORM name_untitled_check CHANGING p_wa_final TYPE wa_final.

IF p_wa_final-name IS INITIAL.

p_wa_final-name = 'Untitled'.

p_wa_final-light = 1.

ls_color-fname = 'NAME'.

ls_color-color-col = col_negative.

ls_color-color-int = 0.

ls_color-color-inv = 0.

APPEND ls_color TO lt_color.

p_wa_final-t_color = lt_color.

CLEAR ls_color.

ENDIF.

ENDFORM. " name_untitled_check

*&---------------------------------------------------------------------*

*& Form locale_list

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM locale_list .

value-key ='ar_DZ'.

value-text = 'Arabic (Algeria)'.

APPEND value TO list.

value-key = 'ar_BH'.

value-text = 'Arabic (Bahrain)'.

APPEND value TO list.

value-key = 'ar_EG'.

value-text = 'Arabic (Egypt)'.

APPEND value TO list.

value-key = 'ar_JO'.

value-text = 'Arabic (Jordan)'.

APPEND value TO list.

value-key = 'ar_IQ'.

value-text = 'Arabic (Iraq)'.

APPEND value TO list.

value-key = 'ar_KW'.

value-text = 'Arabic (Kuwait)'.

APPEND value TO list.

value-key = 'ar_LB'.

value-text = 'Arabic (Lebanon)'.

APPEND value TO list.

value-key = 'ar_LY'.

value-text = 'Arabic (Libya)'.

APPEND value TO list.

value-key = 'ar_MA'.

value-text = 'Arabic (Morocco)'.

APPEND value TO list.

value-key = 'ar_OM'.

value-text = 'Arabic (Oman)'.

APPEND value TO list.

value-key = 'ar_QA'.

value-text = 'Arabic (Qatar)'.

APPEND value TO list.

value-key = 'ar_SA'.

value-text = 'Arabic (Saudi Arabia)'.

APPEND value TO list.

value-key = 'ar_SD'.

value-text = 'Arabic (Sudan)'.

APPEND value TO list.

value-key = 'ar_SY'.

value-text = 'Arabic (Syria)'.

APPEND value TO list.

value-key = 'ar_TN'.

value-text = 'Arabic (Tunisia)'.

APPEND value TO list.

value-key = 'ar_AE'.

value-text = 'Arabic (United Arab Emirates)'.

APPEND value TO list.

value-key = 'Yemen'.

value-text = 'Arabic (Yemen)'.

APPEND value TO list.

value-key = 'bg_BG'.

value-text = 'Bulgarian (Bulgaria)'.

APPEND value TO list.

value-key = 'zh_CN'.

value-text = 'Chinese (China)'.

APPEND value TO list.

value-key = 'zh_HK'.

value-text = 'Chinese (Hong Kong)'.

APPEND value TO list.

value-key = 'zh_TW'.

value-text = 'Chinese (Taiwan)'.

APPEND value TO list.

value-key = 'hr_HR'.

value-text = 'Croatian (Croatia)'.

APPEND value TO list.

value-key = 'cs_CZ'.

value-text = 'Czech (Czech Republic)'.

APPEND value TO list.

value-key = 'da_DK'.

value-text = 'Danish (Denmark)'.

APPEND value TO list.

value-key = 'nl_BE'.

value-text = 'Dutch (Belgium)'.

APPEND value TO list.

value-key = 'nl_NL'.

value-text = 'Dutch (Netherlands)'.

APPEND value TO list.

value-key = 'en_AU'.

value-text = 'English (Australia)'.

APPEND value TO list.

value-key = 'en_CA'.

value-text = 'English (Canada)'.

APPEND value TO list.

value-key = 'en_IN'.

value-text = 'English (India)'.

APPEND value TO list.

value-key = 'en_IE'.

value-text = 'English (Ireland)'.

APPEND value TO list.

value-key = 'en_NZ'.

value-text = 'English (New Zealand)'.

APPEND value TO list.

value-key = 'en_ZA'.

value-text = 'English (South Africa)'.

APPEND value TO list.

value-key = 'en_GB'.

value-text = 'English (United Kingdom)'.

APPEND value TO list.

value-key = 'en_GB_EURO'.

value-text = 'English (United Kingdom Euro)'.

APPEND value TO list.

value-key = 'en_US'.

value-text = 'English (USA)'.

APPEND value TO list.

value-key = 'et_EE'.

value-text = 'Estonian (Estonia)'.

APPEND value TO list.

value-key = 'fi_FI'.

value-text = 'Finnish (Finland)'.

APPEND value TO list.

value-key = 'fr_BE'.

value-text = 'French (Belgium)'.

APPEND value TO list.

value-key = 'fr_CA'.

value-text = 'French (Canada)'.

APPEND value TO list.

value-key = 'fr_FR'.

value-text = 'French (France)'.

APPEND value TO list.

value-key = 'fr_LU'.

value-text = 'French (Luxembourg)'.

APPEND value TO list.

value-key = 'fr_CH'.

value-text = 'French (Switzerland)'.

APPEND value TO list.

value-key = 'de_AT'.

value-text = 'German (Austria)'.

APPEND value TO list.

value-key = 'de_DE'.

value-text = 'German (Germany)'.

APPEND value TO list.

value-key = 'de_LU'.

value-text = 'German (Luxembourg)'.

APPEND value TO list.

value-key = 'de_CH'.

value-text = 'German (Switzerland)'.

APPEND value TO list.

value-key = 'el_GR'.

value-text = 'Greek (Greece)'.

APPEND value TO list.

value-key = 'he_IL'.

value-text = 'Hebrew (Israel)'.

APPEND value TO list.

value-key = 'hu_HU'.

value-text = 'Hungarian (Hungary)'.

APPEND value TO list.

value-key = 'id_ID'.

value-text = 'Indonesian (Indonesia)'.

APPEND value TO list.

value-key = 'it_IT'.

value-text = 'Italian (Italy)'.

APPEND value TO list.

value-key = 'it_CH'.

value-text = 'Italian (Switzerland)'.

APPEND value TO list.

value-key = 'ja_JP'.

value-text = 'Japanese (Japan)'.

APPEND value TO list.

value-key = 'ko_KR'.

value-text = 'Korean (Korea)'.

APPEND value TO list.

value-key = 'ko_KR_HANI'.

value-text = 'Korean (Korea Hanja)'.

APPEND value TO list.

value-key = 'lv_LV'.

value-text = 'Latvian (Latvia)'.

APPEND value TO list.

value-key = 'lt_LT'.

value-text = 'Lithuanian (Lithuania)'.

APPEND value TO list.

value-key = 'ms_MY'.

value-text = 'Malay (Malaysia)'.

APPEND value TO list.

value-key = 'nb_NO'.

value-text = 'Norwegian-Bokmal (Norway)'.

APPEND value TO list.

value-key = 'nn_NO'.

value-text = 'Norwegian-Nynorsk (Norway)'.

APPEND value TO list.

value-key = 'pl_PL'.

value-text = 'Polish (Poland)'.

APPEND value TO list.

value-key = 'pt_BR'.

value-text = 'Portuguese (Brazil)'.

APPEND value TO list.

value-key = 'pt_PT'.

value-text = 'Portuguese (Portugal)'.

APPEND value TO list.

value-key = 'ro_RO'.

value-text = 'Romanian (Romania)'.

APPEND value TO list.

value-key = 'ru_RU'.

value-text = 'Russian (Russia)'.

APPEND value TO list.

value-key = 'sh_BA'.

value-text = 'Serbo-Croatian (Bosnia and Herzegovina)'.

APPEND value TO list.

value-key = 'sh_HR'.

value-text = 'Serbo-Croatian (Croatia)'.

APPEND value TO list.

value-key = 'sh_CS'.

value-text = 'Serbo-Croatian (Serbia and Montenegro)'.

APPEND value TO list.

value-key = 'sk_SK'.

value-text = 'Slovak (Slovakia)'.

APPEND value TO list.

value-key = 'sl_SI'.

value-text = 'Slovenian (Slovakia)'.

APPEND value TO list.

value-key = 'es_AR'.

value-text = 'Spanish (Argentina)'.

APPEND value TO list.

value-key = 'es_BO'.

value-text = 'Spanish (Bolivia)'.

APPEND value TO list.

value-key = 'es_CL'.

value-text = 'Spanish (Chile)'.

APPEND value TO list.

value-key = 'es_CO'.

value-text = 'Spanish (Colombia)'.

APPEND value TO list.

value-key = 'es_CR'.

value-text = 'Spanish (Costa Rica)'.

APPEND value TO list.

value-key = 'es_DO'.

value-text = 'Spanish (Dominican Republic)'.

APPEND value TO list.

value-key = 'es_EC'.

value-text = 'Spanish (Ecuador)'.

APPEND value TO list.

value-key = 'es_SV'.

value-text = 'Spanish (El Salvador)'.

APPEND value TO list.

value-key = 'es_GT'.

value-text = 'Spanish (Guatemala)'.

APPEND value TO list.

value-key = 'es_HN'.

value-text = 'Spanish (Honduras)'.

APPEND value TO list.

value-key = 'es_MX'.

value-text = 'Spanish (Mexico)'.

APPEND value TO list.

value-key = 'es_NI'.

value-text = 'Spanish (Nicaragua)'.

APPEND value TO list.

value-key = 'es_PA'.

value-text = 'Spanish (Panama)'.

APPEND value TO list.

value-key = 'es_PY'.

value-text = 'Spanish (Paraguay)'.

APPEND value TO list.

value-key = 'es_PE'.

value-text = 'Spanish (Peru)'.

APPEND value TO list.

value-key = 'es_PR'.

value-text = 'Spanish (Puerto Rico)'.

APPEND value TO list.

value-key = 'es_ES'.

value-text = 'Spanish (Spain)'.

APPEND value TO list.

value-key = 'es_UY'.

value-text = 'Spanish (Uruguay)'.

APPEND value TO list.

value-key = 'es_VE'.

value-text = 'Spanish (Venezuela)'.

APPEND value TO list.

value-key = 'sv_SE'.

value-text = 'Swedish (Sweden)'.

APPEND value TO list.

value-key = 'th_TH'.

value-text = 'Thai (Thailand)'.

APPEND value TO list.

value-key = 'th_TH_TH'.

value-text = 'Thai (Thailand Traditional)'.

APPEND value TO list.

value-key = 'tr_TR'.

value-text = 'Turkish (Turkey)'.

APPEND value TO list.

value-key = 'uk_UA'.

value-text = 'Ukrainian (Ukraine)'.

APPEND value TO list.

value-key = 'vi_VN'.

value-text = 'Vietnamese (Vietnam)'.

APPEND value TO list.

value-key = 'ambient' .

value-text = 'Viewers system locale'.

APPEND value TO list.

ENDFORM. " locale_list

*&---------------------------------------------------------------------*

*& Form change_val

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* -->P_T_SPACE text

* <--P_TCINDENTL text

*----------------------------------------------------------------------*

FORM change_val USING p_space

CHANGING p_tins.

IF p_space = space .

IF p_tins IS INITIAL.

p_tins = '0pt'.

ENDIF.

ENDIF.

IF p_space = 'I' .

IF NOT ( p_tins EQ space OR p_tins EQ '0pt') .

IF p_tins CA '-'.

p_tins = 'Hanging'.

ELSE.

p_tins = 'First Line'.

ENDIF.

ELSE.

p_tins = 'None' .

ENDIF.

ENDIF.

IF p_space = 'S' .

IF p_tins EQ space.

p_tins = 'Single' .

ELSEIF p_tins EQ '18.75pt'.

p_tins = '1.5 Lines' .

ELSEIF p_tins EQ '25pt'.

p_tins = 'Double line' .

ELSE.

CONCATENATE 'Exactly' p_tins INTO p_tins SEPARATED BY space.

ENDIF.

ENDIF.

ENDFORM. " change_val

*Text symbols

*001 Form Downloads

*002 Layout Testing

*007 Display all fields

*008 Dispaly fields whose FONT not equal to ARIAL

*009 Dispaly fields which are not BINDED

*010 Dispaly fields on which SCRIPTING is done

*012 Dispaly fields which have ACCESSIBILTY issue

*013 Leagal Form

*014 Dispaly fields whose ACCESS TYPE not equl to READ ONLY

*015 Dispaly fields whose LOCALE not equal to COUNTRYSPECIFIC

*016 Country Specific

*Text elements

*----------------------------------------------------------

* 001 Form Downloads

* 002 Layout Testing

* 007 Display all fields

* 008 Dispaly fields whose FONT not equal to ARIAL

* 009 Dispaly fields which are not BINDED

* 010 Dispaly fields on which SCRIPTING is done

* 012 Dispaly fields which have ACCESSIBILTY issue

* 013 Leagal Form

* 014 Dispaly fields whose ACCESS TYPE not equl to READ ONLY

* 015 Dispaly fields whose LOCALE not equal to COUNTRYSPECIFIC

* 016 Country Specific

*Messages

*----------------------------------------------------------

*

* Message class: EZ

*001 &1&2&3&4

*506 &1 &2 does not exist

*572 PDF-based form &1 does not exist yet

*576 PDF-based form &1 is not active

*

* Message class: FPAPICHK

*003 Interface & not available actively

*Text elements

*----------------------------------------------------------

* 001 Form Downloads

* 002 Layout Testing

* 007 Display all fields

* 008 Dispaly fields whose FONT not equal to ARIAL

* 009 Dispaly fields which are not BINDED

* 010 Dispaly fields on which SCRIPTING is done

* 012 Dispaly fields which have ACCESSIBILTY issue

* 013 Leagal Form

* 014 Dispaly fields whose ACCESS TYPE not equl to READ ONLY

* 015 Dispaly fields whose LOCALE not equal to COUNTRYSPECIFIC

* 016 Country Specific

*Messages

*----------------------------------------------------------

*

* Message class: EZ

*001 &1&2&3&4

*506 &1 &2 does not exist

*572 PDF-based form &1 does not exist yet

*576 PDF-based form &1 is not active

*

* Message class: FPAPICHK

*003 Interface & not available actively

  • No labels