Components of rate structure
Hi,
Could anyone please tell me the components of rate structure.
Are these : Installation, Facts,Billing Class , Rate Category, Billing Schema the only components of billing Schema.
Thanks and Regards
Mahavir
Hi,
Hello,
Billing component is overall for to do billing the services.Billing component has Master data.
the followe\ing are the master data:
Billing class
Rate type
price
operands
variant program
rate
fact group
schema
rate category..
if u still have any querries ,please let me know.i hope i answered ur question.
Similar Messages
-
Dynamic Structure and Components Issue
Hi,
I have a requirement of creating an inbound idoc program and populating dynamic structures. The program for the dynamic structure creation is as follows: ( I have been referencing Heilmans Blog ): The part for the inbound idoc creation works fine. The data will come in a flat file with Table name and 15 characterstcis. The table name is known at runtime. I need to create the dynamic table, find out the components and then populate the custom table with the dynamically created structures.
Custom table: 4 components
Internal table from file: 15 components with value.
There could be more than one table in the flat file and not all components or char in the flat file is mapped to the table.
I have been able to code the part where the components in the structure and the file components are in the same order. The problem is if the components in the structure and the file components are not in the same order. I would appreciate some inputs in this issue.
The part that has to be worked out is:
IF NOT L_TABNAME IS INITIAL.
perform get_structure.
perform create_dynamic_itab.
perform get_data.
ENDIF.
*& Report /FACTGLB/GTDMI_VARTAB_IDOCS02 *
PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
DEVELOPER: Aveek Ghose
CREATION DATE: 2008-07-02
RDD NUMBER: DCDD027
TRANSPORT NUMBER(S): RD2K902769
*-- REVISION HISTORY -
DEVELOPER:
DATE APPLIED: YYYY-MM-DD
SCR NUMBER: <Scope Change Request ID>
RDD NUMBER: <Toolset Object ID>
TRANSPORT NUMBER(S):
DESCRIPTION:
REPORT ZGTDMI_VARTAB_IDOCS_DYNAMIC
NO STANDARD PAGE HEADING
LINE-SIZE 150
LINE-COUNT 55
MESSAGE-ID zfactglb.
**Include for Global Data Declaration
*INCLUDE /FACTGLB/GTDMI_VARTAB_TOP02.
**Include for Selection Screen
*INCLUDE /FACTGLB/GTDMI_VARTAB_SEL02.
**Include for Sub Routines
*INCLUDE /FACTGLB/GTDMI_VARTAB_FORMS02.
*& Include /FACTGLB/GTDMI_VARTAB_TOP02 *
*& Include /FACTGLB/GTDMI_VARTAB_TOP02 *
*& Include /FACTGLB/GTDMI_VARTAB_TOP
*& Include /FACTGLB/GTDMI_VARTAB_TOP
PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
DEVELOPER: Aveek Ghose
CREATION DATE: 2008-07-02
RDD NUMBER: DCDD027
TRANSPORT NUMBER(S): RD2K902769
*-- REVISION HISTORY -
DEVELOPER:
DATE APPLIED: YYYY-MM-DD
SCR NUMBER: <Scope Change Request ID>
RDD NUMBER: <Toolset Object ID>
TRANSPORT NUMBER(S):
DESCRIPTION:
TYPE POOLS
*Type declaration for ALV display
TYPE-POOLS : slis.
Include .
type-pools: col, "#EC *
icon, "#EC *
sym, "#EC *
abap. "#EC *
Target structure definitions
tables:
E1CUVTM, "#EC *
E1DATEM, "#EC *
E1CUV1M, "#EC *
edp21, "#EC *
edi_dc40, "#EC *
edi_dd40, "#EC *
edi_ds40. "#EC *
GLOBAL TYPES
TYPES : BEGIN OF ty_vartab.
include structure E1CUVTM.
TYPES: END OF ty_vartab.
TYPES : BEGIN OF ty_vartabdate.
INCLUDE STRUCTURE E1DATEM.
TYPES : END OF ty_vartabdate.
*Structure for data retreived
TYPES : BEGIN OF ty_vardetails.
INCLUDE STRUCTURE E1CUV1M.
TYPES : END OF ty_vardetails.
*Structure for data retreived from table tabinput.
TYPES : BEGIN OF ty_tabinput,
lines type string,
END OF ty_tabinput.
*Structure for data retreived from Table dsn_input.
TYPES : BEGIN OF ty_dsninput, "#EC *
LINE(101) type c,
END OF ty_dsninput.
*Structure for data retreived from Table dsn_input.
TYPES : BEGIN OF ty_newinput, "#EC *
LINE(101) type c,
flag(1) type c,
END OF ty_newinput.
*Structure for keeping the values of all the custom tables
TYPES : BEGIN OF ty_custom_tabs,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
qunty TYPE P DECIMALS 2, "Standard Order Quantity
det_loc TYPE CHAR6, "Detail Location
class TYPE CHAR2, "Class
rate TYPE P DECIMALS 2, "Rate
END OF ty_custom_tabs.
*Type declared for the internal table and work area which will store
*fields for error log
TYPES : BEGIN OF ty_error_log,
matnr TYPE matnr, "Material Number
mtart TYPE mtart, "Material Type
sel_data TYPE char10, "No of selectyed data
END OF ty_error_log.
*Structure for keeping the output data
TYPES : BEGIN OF ty_final,
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
END OF ty_final.
TYPES: begin of TY_CONTENTHD,
VTNAM(018) type C,
FLAG(001) type C,
end of TY_CONTENTHD.
TYPES: begin of TY_CONTENT,
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
Z_VARCOND TYPE VARCOND.
TYPES: end of TY_CONTENT.
TYPES: begin of TY_CONTENTTAB,
VTNAM(018) type C,
COMP1(30) TYPE C,
CHAR1(030) type C,
COMP2(30) TYPE C,
CHAR2(030) type C,
COMP3(30) TYPE C,
CHAR3(030) type C,
COMP4(30) TYPE C,
CHAR4(030) type C,
COMP5(30) TYPE C,
CHAR5(030) type C,
COMP6(30) TYPE C,
CHAR6(030) type C,
COMP7(30) TYPE C,
CHAR7(030) type C,
COMP8(30) TYPE C,
CHAR8(030) type C,
COMP9(30) TYPE C,
CHAR9(030) type C,
COMP10(30) TYPE C,
CHAR10(030) type C,
COMP11(30) TYPE C,
CHAR11(030) type C,
COMP12(30) TYPE C,
CHAR12(030) type C,
COMP13(30) TYPE C,
CHAR13(030) type C,
COMP14(30) TYPE C,
CHAR14(030) type C,
COMP15(30) TYPE C,
CHAR15(030) type C,
FLAG(001) type C.
TYPES: end of TY_CONTENTTAB.
TYPES: BEGIN OF TY_E1CUVTM,
MSGFN TYPE MSGFN,
VAR_TAB TYPE APITABL,
STATUS TYPE RCUTBST,
VTGROUP TYPE RCUTBGR,
AUTHSTRUC TYPE RCUTBBE,
AUTHENTRY TYPE RCUFNBI,
FLDELETE TYPE FLLKENZ,
DBTABNAME TYPE TABNAME16,
DBCONACTIVE TYPE DBCON_ACTI,
PRESDEC TYPE VTDCT,
END OF TY_E1CUVTM.
TYPES: BEGIN OF TY_E1CUV1M,
MSGFN TYPE MSGFN,
VTLINENO TYPE VTLINENO,
VTCHARACT TYPE ATNAM,
ATWRT TYPE ATWRT,
ATFLV TYPE ATFLV,
ATAWE TYPE MSEHI,
ATFLB TYPE ATFLB,
ATAW1 TYPE MSEHI,
ATCOD TYPE ATCOD,
ATTLV TYPE ATTLV,
ATTLB TYPE ATTLB,
ATPRZ TYPE ATPRZ,
ATINC TYPE ATINC,
VTLINENO5 TYPE VTLINENO5,
END OF TY_E1CUV1M.
TYPES: BEGIN OF TY_E1DATEM,
MSGFN TYPE MSGFN,
KEY_DATE TYPE SYDATUM,
AENNR TYPE AENNR,
EFFECTIVITY TYPE CC_MTEFF,
END OF TY_E1DATEM.
TYPES: BEGIN OF ty_vtnam,
vtint TYPE vtint, " Internal number of variant table
vtnam TYPE vtnam, " Name of variant table
dbtab_name type tabname16, "Custom table Name
error TYPE char1, " Indicates error in data format
reas TYPE char50, " Reason for failure
END OF ty_vtnam.
Get data type for characteristic
TYPES: BEGIN OF ty_cabn,
atinn TYPE atinn, "Internal characteristic
atnam TYPE atnam, "Characteristic Name
atfor TYPE atfor, "Data type of characteristic
atson TYPE atson, "Indicator: Additional Values
atprt TYPE atprt, "Check table
atprr TYPE atprr, "Name of Check Report Program
atprf TYPE atprf, "Function Module for Checking Values
anzdz TYPE anzdz, "Number of Decimal Places
check TYPE char1, "Indicates check required or not
END OF ty_cabn.
Get field names of variant table
TYPES: BEGIN OF ty_cuvtab_fld,
vtint TYPE vtint, " Internal number of variant table
atinn TYPE atinn, " Internal characteristic
vtpos TYPE vtpos, " Item number of characteristic in variant
*mod-012
DBFLD type NAME_FELD,
*mod-012
exist TYPE char1, " X Indictaes characteristic is part of fil
END OF ty_cuvtab_fld.
Store all data in internal table
TYPES: BEGIN OF ty_file,
vtnam TYPE vtnam,
char1 TYPE atwrt,
char2 TYPE atwrt,
char3 TYPE atwrt,
char4 TYPE atwrt,
char5 TYPE atwrt,
char6 TYPE atwrt,
char7 TYPE atwrt,
char8 TYPE atwrt,
char9 TYPE atwrt,
char10 TYPE atwrt,
char11 TYPE atwrt,
char12 TYPE atwrt,
char13 TYPE atwrt,
char14 TYPE atwrt,
char15 TYPE atwrt,
flag TYPE char1,
error TYPE char50,
END OF ty_file.
To check for duplicates
TYPES: BEGIN OF ty_dupl,
vtnam TYPE vtnam,
char1 TYPE atwrt,
char2 TYPE atwrt,
char3 TYPE atwrt,
char4 TYPE atwrt,
char5 TYPE atwrt,
char6 TYPE atwrt,
char7 TYPE atwrt,
char8 TYPE atwrt,
char9 TYPE atwrt,
char10 TYPE atwrt,
char11 TYPE atwrt,
char12 TYPE atwrt,
char13 TYPE atwrt,
char14 TYPE atwrt,
char15 TYPE atwrt,
slnid TYPE slnid,
END OF ty_dupl.
Get previously loaded characteristic values for internal table (CHAR)
TYPES: BEGIN OF ty_cuvtab_valc,
vtint TYPE vtint, " Internal number of variant table
slnid TYPE slnid, " Key for value combination in variant tab
atinn TYPE atinn, " Internal characteristic
valc TYPE atwrt, " Characteristic Value
END OF ty_cuvtab_valc.
Get previously loaded characteristic values for internal table (NUM)
TYPES: BEGIN OF ty_cuvtab_valn,
vtint TYPE vtint, " Internal number of variant table
slnid TYPE slnid, " Key for value combination in variant tab
atinn TYPE atinn, " Internal characteristic
val_from TYPE atflv, " Internal floating point from
END OF ty_cuvtab_valn.
Store column positions of characteristics
TYPES: BEGIN OF ty_col_pos,
vtint TYPE vtint, " Internal number of variant table
vtnam TYPE vtnam, " Variant table name
atinn TYPE atinn, "Internal characteristic
atnam TYPE atnam, "Characteristic Name
field TYPE fieldname, "Field name
req TYPE char1, " Required or not
vtpos TYPE vtpos, " Item number of characteristics
DBFLD type NAME_FELD, " Field Name of Custom table.
END OF ty_col_pos.
Store valid values for characteristics
TYPES: BEGIN OF ty_cawn,
atinn TYPE atinn, " Internal characteristic
atzhl TYPE atzhl, " Int counter
atwrt TYPE atwrt, " Characteristic Value
atflv TYPE atflv, " Internal floating point from
lkenz TYPE lkenz, " Deletion indicator
END OF ty_cawn.
Store error messages for individual lines
TYPES: BEGIN OF ty_error,
vtnam TYPE vtnam, " Variant table name
fname TYPE fieldname, " Fieldname
atnam TYPE atnam, " Characteristic name
atwrt TYPE atwrt, " Characteristic value
row TYPE char5, " Row id
END OF ty_error.
Begin TPR# 4618
To store unique number for variant
TYPES: BEGIN OF ty_vnt_ma,
vtnam TYPE vtnam,
unique_no TYPE ZGTDM_UNQN,
no_chr TYPE ZGTDM_NO_CHR,
END OF ty_vnt_ma.
TYPES: BEGIN OF ty_dbtab,
vtint TYPE vtint,
vtnam TYPE vtnam,
DBTAB_NAME TYPE TABNAME16,
END OF ty_dbtab.
To find out concatenated number for
TYPES: BEGIN OF ty_split,
f1 TYPE char6,
END OF ty_split.
TYPES: BEGIN OF ty_charval,
char TYPE char30,
END OF ty_charval.
TYPES: BEGIN OF TY_DATA,
name TYPE string,
value(15) type c,
END OF TY_DATA.
DATA: I_DATATAB TYPE STANDARD TABLE OF TY_DATA.
TYPES:
TUMLS_MESSTYPE type /SAPDMC/LS_MESSTYPE,
TUMLS_MESSTYPETXT type EDI_TEXT60,
TUMLS_MESSCODE type EDIPMESCOD.
TYPES:
TUMLS_TABNAME TYPE TABNAME, "#EC *
TUMLS_SEGMENT TYPE TABNAME. "#EC *
TYPES:
TUMLS_PATHFILE TYPE /SAPDMC/LS_FILENAME,
TUMLS_FILENAME TYPE /SAPDMC/LS_FILENAME,
TUMLS_FILETEXT TYPE /SAPDMC/LS_FILETEXT.
TYPES:
BEGIN OF type_errorline,
msgty type SYMSGTY,
id type SYMSGID,
msgno type symsgno,
par1 type symsgv,
par2 type symsgv,
par3 type symsgv,
par4 type symsgv,
END OF type_errorline.
TYPES:
type_errortab TYPE SORTED TABLE
OF type_errorline
WITH NON-UNIQUE KEY id msgno par1 par2 par3 par4.
DATA:
LV_INDEX TYPE SY-INDEX,
LV_INDEX2 TYPE SYINDEX,
LV_TABLE1 TYPE REF TO DATA,
LV_TABLE2 TYPE REF TO DATA,
LV_TABLE3 TYPE REF TO DATA,
LV_TABLE4 TYPE REF TO DATA,
LV_LINE1 TYPE REF TO DATA,
LV_LINE2 TYPE REF TO DATA,
LV_LINE3 TYPE REF TO DATA,
LV_LINE4 TYPE REF TO DATA,
LV_OFFSET1 TYPE SYTABIX,
ST_IS_LAYOUT_ALV TYPE SLIS_LAYOUT_ALV,
L_IT_FCATLOG_ALV TYPE SLIS_T_FIELDCAT_ALV,
L_IT_FLDCAT TYPE LVC_T_FCAT.
GLOBAL INTERNAL TABLES
DATA : i_newinput TYPE STANDARD TABLE OF ty_newinput INITIAL SIZE 0."#EC *
DATA : i_contentheader1 TYPE STANDARD TABLE OF ty_contenthd INITIAL SIZE 0."#EC *
DATA : i_contenttab1 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab2 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab3 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab4 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab5 TYPE STANDARD TABLE OF ty_contenttab INITIAL SIZE 0."#EC *
DATA : i_E1CUV1M TYPE STANDARD TABLE OF E1CUV1M INITIAL SIZE 0."#EC *
DATA : i_errortab TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
GLOBAL WORK AREAS
**Internal Table for the structure TY_T001L
DATA : wa_vartab TYPE ty_vartab. "#EC *
DATA : wa_vartabdate TYPE ty_vartabdate. "#EC *
DATA : wa_vardetails TYPE ty_vardetails. "#EC *
DATA : wa_tabinput TYPE ty_tabinput. "#EC *
DATA : wa_dsninput TYPE ty_dsninput. "#EC *
DATA : wa_newinput TYPE ty_newinput. "#EC *
DATA : wa_gnewinput TYPE ty_newinput. "#EC *
DATA : wa_ginput_data TYPE ty_newinput. "#EC *
DATA : wa_final TYPE ty_final. "#EC *
DATA : wa_content TYPE ty_content. "#EC *
DATA : wa_contenthd TYPE ty_contenthd. "#EC *
DATA : wa_contentheader type ty_contenthd. "#EC *
DATA : wa_contenttab TYPE ty_content. "#EC *
DATA : wa_content1 TYPE ty_content. "#EC *
DATA : wa_contenthd1 TYPE ty_contenthd. "#EC *
DATA : wa_contentheader1 type ty_contenthd. "#EC *
DATA : wa_contenttab1 TYPE ty_content. "#EC *
DATA : wa_contenttab2 TYPE ty_content. "#EC *'
DATA : wa_contenttab3 TYPE ty_content. "#EC *
DATA : wa_contenttab4 TYPE ty_content. "#EC *
DATA : wa_contenttab5 TYPE ty_contentTAB. "#EC *
DATA : wa_E1CUVTM TYPE E1CUVTM. "#EC *
DATA : wa_E1CUV1M TYPE E1CUV1M. "#EC *
DATA : wa_E1DATEM TYPE E1DATEM. "#EC *
DATA : wa_error_tab TYPE solisti1. "#EC *
INTERNAL TABLES AND WORK AREAS FOR BDC
*Internal Table to store the data to display the error message
DATA : i_errormsg TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
*Internal Table to store the data to display the error message
DATA : i_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
DATA : itab_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
**Work area to store the data to display the error message
DATA : wa_errormsg TYPE solisti1. "#EC *
**Internal table which will store data for the error log
DATA:i_error_log TYPE STANDARD TABLE OF ty_error_log INITIAL SIZE 0."#EC *
GLOBAL VARIABLES
DATA: G_FILE TYPE string. "#EC *
DATA : g_ctr_input_recs(5) type c. "#EC *
DATA: g_ctr_output_recs(5) type p. "#EC *
data : g_msg(100) type c. "#EC *
data: g_struct_file TYPE string. "#EC *
data: g_login type FILEINTERN. "#EC *
data: g_phyin type string. "#EC *
DATA: g_lprnt type RSPOPSHORT. "#EC *
DATA: g_FNAME1 TYPE STRING. "#EC *
DATA : g_repid TYPE repid, "#EC *
g_exit(1) TYPE C, "#EC *
gx_variant type disvariant. "#EC *
DATA : g_lines TYPE i . "#EC *
data : g_save(1) type c. "#EC *
DATA : g_splid TYPE rspoid . "#EC *
data: p_login type FILEINTERN. "#EC *
data: p_phyin type string. "#EC *
DATA:
go_table TYPE REF TO cl_salv_table,
go_sdescr TYPE REF TO cl_abap_structdescr,
go_tdescr TYPE REF TO cl_abap_tabledescr,
gdo_data TYPE REF TO data,
gdo_handle TYPE REF TO data,
gs_comp TYPE abap_componentdescr,
gt_components TYPE abap_component_tab.
FIELD-SYMBOLS:
TYPE table.
GLOBAL CONSTANTS
CONSTANTS c_msgar TYPE rslgarea VALUE 'F8'. "#EC *
CONSTANTS c_msgid TYPE rslgsubid VALUE 'E'. "#EC *
CONSTANTS c_urgnc TYPE char04 VALUE 'HIGH'. "#EC *
CONSTANTS C_X(1) TYPE C VALUE 'X'. "#EC *
CONSTANTS C_Y(1) TYPE C VALUE 'Y'. "#EC *
CONSTANTS C_Z(1) TYPE C VALUE 'Z'. "#EC *
CONSTANTS C_E(1) TYPE C VALUE 'E'. "#EC *
CONSTANTS C_SAP(3) TYPE C VALUE 'SAP'. "#EC *
CONSTANTS C_MOD(3) TYPE C VALUE 'MOD'. "#EC *
CONSTANTS C_MD1(3) TYPE C VALUE 'MD1'. "#EC *
CONSTANTS C_MD2(3) TYPE C VALUE 'MD2'. "#EC *
CONSTANTS C_MD3(3) TYPE C VALUE 'MD3'. "#EC *
CONSTANTS C_MD4(3) TYPE C VALUE 'MD4'. "#EC *
CONSTANTS C_MD5(3) TYPE C VALUE 'MD5'. "#EC *
constants: c_000001(6) type c value '000001', "#EC *
c_e1cuv1m(7) type c value 'E1CUV1M', "#EC *
c_02(2) type c value '02', "#EC *
c_009(3) type c value '009', "#EC *
c_0001(4) type c value '0001'. "#EC *
constants: c_e1datem(7) type c value 'E1DATEM'. "#EC *
constants: c_e1cuvtm(7) type c value 'E1CUVTM'. "#EC *
GLOBAL INTERNAL TABLES FOR ALV DISPLAY
*Internal tables for ALV Field cat
DATA :
i_fieldcat_ov TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
i_fieldcat_dtl TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
i_fieldcat_ov1 TYPE lvc_t_fcat, "#EC *
i_events TYPE slis_t_event. "#EC *
GLOBAL WORK AREAS FOR ALV DISPLAY
*Work area for ALV Field layout
DATA : wa_layout TYPE slis_layout_alv. "#EC *
*Work area for Field Cat. Table
DATA : wa_fieldcat TYPE slis_fieldcat_alv. "#EC *
GLOBAL VARIABLES FOR ALV DISPLAY
DATA : g_event TYPE slis_t_event. "#EC *
DATA : g_top_of_page TYPE slis_t_listheader. "#EC *
DATA : g_ok_code TYPE char4. "#EC *
DATA : g_variant type disvariant. "#EC *
GLOBAL CONSTANTS FOR ALV DISPLAY
BAL handling
data: iv_log_handle type BALLOGHNDL. "#EC *
data: is_log_header type bal_s_log. "#EC *
data: iv_object type bal_s_log-object value 'CAPI'. "#EC *
data: iv_subobject type bal_s_log-subobject value 'CAPI_LOG'."#EC *
data: iv_tcode type bal_s_log-altcode value 'SE38'. "#EC *
*MOD-005
RANGES:
R_MESTYP FOR EDIDC-MESTYP, "#EC *
R_CREDAT FOR EDIDC-CREDAT, "#EC *
R_CRETIM FOR EDIDC-CRETIM, "#EC *
R_SNDPRT FOR EDIDC-SNDPRT, "#EC *
R_SNDPRN FOR EDIDC-SNDPRN. "#EC *
DATA:
L_MESSTYPE TYPE TUMLS_MESSTYPE. "#EC *
*MOD-005
data: p_sndprn TYPE EDI_SNDPRN, "#EC *
p_sndprt TYPE EDI_SNDPRT, "#EC *
p_sndpor TYPE EDI_SNDPOR. "#EC *
data: p_rcvprn TYPE EDI_RCVPRN, "#EC *
p_rcvprt TYPE EDI_RCVPRT, "#EC *
p_rcvpor TYPE EDI_RCVPOR. "#EC *
data:
init_E1CUVTM type E1CUVTM, "#EC *
prev_E1CUVTM type E1CUVTM, "#EC *
init_E1DATEM type E1DATEM, "#EC *
prev_E1DATEM type E1DATEM, "#EC *
init_E1CUV1M type E1CUV1M, "#EC *
prev_E1CUV1M type E1CUV1M. "#EC *
Source structure definitions
data:
begin of LSMW_TAB_CONTENT, "#EC *
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
end of LSMW_TAB_CONTENT.
Counters
data:
g_cnt_VAR_TAB type i, "#EC *
g_cnt_TAB_CONTENT type i. "#EC *
Counter ct_xxxxxxxxxx: number of transferred records
data:
ct_edi_dc40 type i, "#EC *
cs_edi_dc40 type i, "#EC *
ct_E1CUVTM type i, "#EC *
cs_E1CUVTM type i, "#EC *
ct_E1DATEM type i, "#EC *
cs_E1DATEM type i, "#EC *
ct_E1CUV1M type i, "#EC *
cs_E1CUV1M type i. "#EC *
Global data definitions and data declarations
DATA: wa_cabn TYPE ty_cabn,
wa_cawn TYPE ty_cawn,
wa_file TYPE ty_file,
wa_vtnam TYPE ty_vtnam,
wa_cuvtab_fld TYPE ty_cuvtab_fld,
wa_cuvtab_valn TYPE ty_cuvtab_valn,
wa_cuvtab_valc TYPE ty_cuvtab_valc,
wa_col_pos TYPE ty_col_pos,
wa_error TYPE ty_error,
wa_dupl TYPE ty_dupl,
wa_dupl_file TYPE ty_dupl.
DATA: wa_vnt_ma TYPE ty_vnt_ma,
wa_split TYPE ty_split.
DATA: wa_charval TYPE ty_charval. "#EC *
Internal table
DATA: i_cabn TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_cabn_temp TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_cabn_atinn TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_file TYPE STANDARD TABLE OF ty_file, "#EC *
i_file_tmp TYPE STANDARD TABLE OF ty_file, "#EC *
i_vtnam TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_cuvtab TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_cuvtab_fld TYPE STANDARD TABLE OF ty_cuvtab_fld, "#EC *
i_cuvtab_valn TYPE STANDARD TABLE OF ty_cuvtab_valn, "#EC *
i_cuvtab_valc TYPE STANDARD TABLE OF ty_cuvtab_valc, "#EC *
i_col_pos TYPE STANDARD TABLE OF ty_col_pos, "#EC *
i_cawn TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_n TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_c TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_i TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cuv_error TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_dupl TYPE STANDARD TABLE OF ty_dupl, "#EC *
i_dbtab TYPE STANDARD TABLE OF ty_dbtab. "#EC *
DATA: i_vnt_ma TYPE STANDARD TABLE OF ty_vnt_ma, "#EC *
i_split TYPE STANDARD TABLE OF ty_split. "#EC *
DATA: i_dupl_file TYPE STANDARD TABLE OF ty_dupl. "#EC *
DATA: i_charval TYPE STANDARD TABLE OF ty_charval. "#EC *
Constants
CONSTANTS: c_char TYPE atfor VALUE 'CHAR', "#EC *
c_date TYPE atfor VALUE 'DATE', "#EC *
c_time TYPE atfor VALUE 'TIME', "#EC *
c_varcond TYPE atnam VALUE 'Z_VARCOND'. "#EC *
Field Symbols
FIELD-SYMBOLS: TYPE ANY.
Variables
DATA: g_raw(500) TYPE c, "#EC *
g_invalid TYPE char1, "#EC *
g_error TYPE char1, "#EC *
g_message TYPE char50, "#EC *
g_slnid_c TYPE slnid, "#EC *
g_slnid_n TYPE slnid, "#EC *
g_row TYPE char5. "#EC *
DATA: g_varcond TYPE varcond, "Variant condition "#EC NEEDED
g_split_var TYPE i. "#EC *
Types: begin of ty_charname,
name type atnam,
end of ty_charname.
data: wa_charname type ty_charname, "#EC *
i_charname type standard table of ty_charname. "#EC *
data: cnt_i type i, "#EC *
g_tabix type char10. "#EC *
Types: begin of ty_itab_zedidc40.
include structure edi_dc40.
TYPES: end of ty_itab_zedidc40.
Types: begin of ty_itab_zedidd40.
include structure edi_dd40.
TYPES: end of ty_itab_zedidd40.
DATA: itab_zedidc40 type standard table of
ty_itab_zedidc40 initial size 0. "#EC *
DATA: itab_zedidd40 type standard table of
ty_itab_zedidd40 initial size 0. "#EC *
DATA: wa_itab_zedidc40 type ty_itab_zedidc40.
DATA: wa_itab_zedidd40 type ty_itab_zedidd40.
*MOD-009
data: itab_ze1cuvtm type e1cuvtm, "#EC *
itab_ze1datem type e1datem, "#EC *
itab_ze1cuv1m type e1cuv1m. "#EC *
data: wdocnum(16) type n value 0. "#EC *
data: wsegnum(6) type n value 0. "#EC *
data: witemno(10) type n value 0. "#EC *
data: witemno_new(10) type n value 0. "#EC *
data: witemno_gst(10) type n value 0. "#EC *
data: witemno_qst(10) type n value 0. "#EC *
TYPES: BEGIN OF ty_input_data1, "#EC *
line(560) type c,
flag(1) type c,
END OF ty_input_data1.
DATA: i_input_data type standard table of
ty_input_data1 initial size 0. "with header line.
DATA: i_input_data1 type standard table of
ty_input_data1 initial size 0. "with header line.
DATA: wa_input_data type ty_input_data1. "#EC *
DATA: g_cnt_input_recs type i. "#EC *
DATA: g_flg_error type c. "#EC *
DATA: l_lines type i. "#EC *
DATA: l_lines_varcond type i. "#EC *
DATA: l_lines1 type i. "#EC *
DATA: l_tabix type i. "#EC *
DATA: wa_input_data1 type ty_input_data1. "#EC *
DATA: FILE TYPE STRING.
Fields that are made available to the user:
DATA:
g_cnt_records_read TYPE i, "#EC *
g_cnt_records_transferred TYPE i, "#EC *
g_cnt_transactions_read TYPE i, "#EC *
g_cnt_transactions_transferred TYPE i, "#EC *
g_cnt_idocs_package TYPE i. "#EC *
data: v_log_handle type balloghndl. "#EC *
DATA: gt_curr_edi_dc40 TYPE STANDARD TABLE OF edi_dc40 initial size 0."#EC *
DATA: gt_curr_edi_dd40 TYPE STANDARD TABLE OF edi_dd40 initial size 0."#EC *
DATA: wa_curr_edi_dc40 TYPE edi_dc40. "#EC *
DATA: wa_curr_edi_dd40 TYPE edi_dd40. "#EC *
internal table for error messages during conversion
DATA: g_error_tab TYPE type_errortab, "#EC *
wa_errortab TYPE type_errorline. "#EC *
DATA: g_edidd_segnam type EDI4SEGNAM, "#EC *
g_edidd_hlevel type EDI4HLEVEC. "#EC *
DATA: g_segnum(6) TYPE n.
DATA: g_objecttype(2) type C.
DATA: P_FNAME(128) TYPE C VALUE '/usr/sap/trans/vartabheader'. " MODIF ID MD1 OBLIGATORY.
DATA: P_FNAME1(128) TYPE C VALUE '/usr/sap/trans/vartabcontent'. " MODIF ID MD1 OBLIGATORY.
DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
it_fldcat TYPE lvc_t_fcat.
field-symbols: .
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
data: l_wa_data TYPE TY_CONTENT,
l_tabname TYPE tabname,
itab_data TYPE standard table of TY_CONTENT.
DATA: l_len_slnid TYPE i, "#EC NEEDED
l_len_varcond TYPE i, "#EC NEEDED
l_temp_slnid TYPE i, "#EC NEEDED
l_temp_slnc TYPE char5, "#EC NEEDED
l_temp_varcond TYPE varcond, "#EC NEEDED
l_sub_var TYPE i, "#EC NEEDED
l_val_split TYPE char10. "#EC NEEDED
DATA: l_invalid. "#EC NEEDED
DECLARATION FOR SELECTION SCREEN
*selection-screen skip 1.
*For all the input field entries
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
*Parameter for Input File Name:
PARAMETERS: p_inpt TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File Variant table
PARAMETERS: p_inpt1 TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File variant Content
SELECTION-SCREEN END OF BLOCK bl1.
IDoc creation
selection-screen begin of block idocpars
with frame title text-006.
parameters:
p_trfcpt as checkbox default C_X MODIF ID MD3,
p_packge(5) type n default 1 MODIF ID MD3.
selection-screen end of block idocpars.
SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-038.
Radio Buttons :
parameters:
rb_idocp RADIOBUTTON GROUP RB3 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD6,
rb_custt RADIOBUTTON GROUP RB3 MODIF ID MD6.
SELECTION-SCREEN END OF BLOCK bl5.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-032.
Radio Buttons :
parameters:
rb_apsrv RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD4,
rb_convt RADIOBUTTON GROUP RB1 MODIF ID MD4,
rb_idoc RADIOBUTTON GROUP RB1 MODIF ID MD4,
rb_proc RADIOBUTTON GROUP RB1 MODIF ID MD4.
SELECTION-SCREEN END OF BLOCK bl3.
SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-037.
Radio Buttons :
parameters:
rb_appct RADIOBUTTON GROUP RB2 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD5,
rb_conct RADIOBUTTON GROUP RB2 MODIF ID MD5,
rb_cust RADIOBUTTON GROUP RB2 MODIF ID MD5.
SELECTION-SCREEN END OF BLOCK bl4.
INITIALIZATION
INITIALIZATION.
Check selection-screen entries *
*AT SELECTION-SCREEN.
PERFORM sub_get_physical_file USING p_fpath p_fname.
PERFORM sub_get_physical_file1 USING p_fpath1 p_fname1.
AT SELECTION SCREEN
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
PERFORM sub_get_file. " CHANGING p_fname. "#EC *
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname1.
PERFORM sub_get_file1. " CHANGING p_fname1. "#EC *
AT SELECTIHi,
I now have a requirement for the following:
Duplicate VARCOND if I Use small letters and capital letters. Sequential number also duplicated.
Here is the code and would appreciate if someone could shed some light on the issue.
*& Report ZVARTABDYNFINAL
PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
DEVELOPER: Aveek Ghose
CREATION DATE: 2008-08-25
RDD NUMBER: DCDD027
TRANSPORT NUMBER(S): RD2K902769
*-- REVISION HISTORY -
DEVELOPER:
DATE APPLIED: YYYY-MM-DD
SCR NUMBER: <Scope Change Request ID>
RDD NUMBER: <Toolset Object ID>
TRANSPORT NUMBER(S):
DESCRIPTION:
REPORT ZVARTABDYNFINAL NO STANDARD PAGE HEADING
LINE-SIZE 150
LINE-COUNT 55
MESSAGE-ID /factglb/gta_custdev.
*& Include /FACTGLB/GTDMI_VARTAB_TOP02 *
*& Include /FACTGLB/GTDMI_VARTAB_TOP
*& Include /FACTGLB/GTDMI_VARTAB_TOP
PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
DEVELOPER: Aveek Ghose
CREATION DATE: 2008-08-25
RDD NUMBER: DCDD027
TRANSPORT NUMBER(S): RD2K902769
*-- REVISION HISTORY -
DEVELOPER:
DATE APPLIED: YYYY-MM-DD
SCR NUMBER: <Scope Change Request ID>
RDD NUMBER: <Toolset Object ID>
TRANSPORT NUMBER(S):
DESCRIPTION:
TYPE POOLS
TYPE POOLS
TYPE POOLS
*Type declaration for ALV display
TYPE-POOLS : slis.
Include <icon>.
type-pools: col, "#EC *
icon, "#EC *
sym, "#EC *
abap. "#EC *
Target structure definitions
tables:
E1CUVTM, "#EC *
E1DATEM, "#EC *
E1CUV1M, "#EC *
edp21, "#EC *
edi_dc40, "#EC *
edi_dd40, "#EC *
edi_ds40. "#EC *
GLOBAL TYPES
TYPES : BEGIN OF ty_vartab.
include structure E1CUVTM.
TYPES: END OF ty_vartab.
TYPES : BEGIN OF ty_vartabdate.
INCLUDE STRUCTURE E1DATEM.
TYPES : END OF ty_vartabdate.
*Structure for data retreived
TYPES : BEGIN OF ty_vardetails.
INCLUDE STRUCTURE E1CUV1M.
TYPES : END OF ty_vardetails.
*Structure for data retreived from table tabinput.
TYPES : BEGIN OF ty_tabinput,
lines type string,
END OF ty_tabinput.
*Structure for data retreived from Table dsn_input.
TYPES : BEGIN OF ty_dsninput, "#EC *
LINE(101) type c,
END OF ty_dsninput.
*Structure for data retreived from Table dsn_input.
TYPES : BEGIN OF ty_newinput, "#EC *
LINE(101) type c,
flag(1) type c,
END OF ty_newinput.
*Structure for keeping the values of all the custom tables
TYPES : BEGIN OF ty_custom_tabs,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
qunty TYPE P DECIMALS 2, "Standard Order Quantity
det_loc TYPE CHAR6, "Detail Location
class TYPE CHAR2, "Class
rate TYPE P DECIMALS 2, "Rate
END OF ty_custom_tabs.
*Type declared for the internal table and work area which will store
*fields for error log
TYPES : BEGIN OF ty_error_log,
matnr TYPE matnr, "Material Number
mtart TYPE mtart, "Material Type
sel_data TYPE char10, "No of selectyed data
END OF ty_error_log.
*Structure for keeping the output data
TYPES : BEGIN OF ty_final,
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
END OF ty_final.
TYPES: begin of TY_CONTENTHD,
VTNAM(018) type C,
FLAG(001) type C,
end of TY_CONTENTHD.
TYPES: begin of TY_CONTENT,
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
Z_VARCOND type VARCOND.
TYPES: end of TY_CONTENT.
TYPES: begin of TY_CONTENTTAB,
VTNAM(018) type C,
COMP1(30) TYPE C,
CHAR1(030) type C,
COMP2(30) TYPE C,
CHAR2(030) type C,
COMP3(30) TYPE C,
CHAR3(030) type C,
COMP4(30) TYPE C,
CHAR4(030) type C,
COMP5(30) TYPE C,
CHAR5(030) type C,
COMP6(30) TYPE C,
CHAR6(030) type C,
COMP7(30) TYPE C,
CHAR7(030) type C,
COMP8(30) TYPE C,
CHAR8(030) type C,
COMP9(30) TYPE C,
CHAR9(030) type C,
COMP10(30) TYPE C,
CHAR10(030) type C,
COMP11(30) TYPE C,
CHAR11(030) type C,
COMP12(30) TYPE C,
CHAR12(030) type C,
COMP13(30) TYPE C,
CHAR13(030) type C,
COMP14(30) TYPE C,
CHAR14(030) type C,
COMP15(30) TYPE C,
CHAR15(030) type C,
FLAG(001) type C.
TYPES: end of TY_CONTENTTAB.
TYPES: BEGIN OF TY_E1CUVTM,
MSGFN TYPE MSGFN,
VAR_TAB TYPE APITABL,
STATUS TYPE RCUTBST,
VTGROUP TYPE RCUTBGR,
AUTHSTRUC TYPE RCUTBBE,
AUTHENTRY TYPE RCUFNBI,
FLDELETE TYPE FLLKENZ,
DBTABNAME TYPE TABNAME16,
DBCONACTIVE TYPE DBCON_ACTI,
PRESDEC TYPE VTDCT,
END OF TY_E1CUVTM.
TYPES: BEGIN OF TY_E1CUV1M,
MSGFN TYPE MSGFN,
VTLINENO TYPE VTLINENO,
VTCHARACT TYPE ATNAM,
ATWRT TYPE ATWRT,
ATFLV TYPE ATFLV,
ATAWE TYPE MSEHI,
ATFLB TYPE ATFLB,
ATAW1 TYPE MSEHI,
ATCOD TYPE ATCOD,
ATTLV TYPE ATTLV,
ATTLB TYPE ATTLB,
ATPRZ TYPE ATPRZ,
ATINC TYPE ATINC,
VTLINENO5 TYPE VTLINENO5,
END OF TY_E1CUV1M.
TYPES: BEGIN OF TY_E1DATEM,
MSGFN TYPE MSGFN,
KEY_DATE TYPE SYDATUM,
AENNR TYPE AENNR,
EFFECTIVITY TYPE CC_MTEFF,
END OF TY_E1DATEM.
TYPES: BEGIN OF ty_vtnam,
vtint TYPE vtint, " Internal number of variant table
vtnam TYPE vtnam, " Name of variant table
dbtab_name type tabname16, "Custom table Name
error TYPE char1, " Indicates error in data format
reas TYPE char50, " Reason for failure
END OF ty_vtnam.
Get data type for characteristic
TYPES: BEGIN OF ty_cabn,
atinn TYPE atinn, "Internal characteristic
atnam TYPE atnam, "Characteristic Name
atfor TYPE atfor, "Data type of characteristic
atson TYPE atson, "Indicator: Additional Values
atprt TYPE atprt, "Check table
atprr TYPE atprr, "Name of Check Report Program
atprf TYPE atprf, "Function Module for Checking Values
anzdz TYPE anzdz, "Number of Decimal Places
check TYPE char1, "Indicates check required or not
END OF ty_cabn.
Get field names of variant table
TYPES: BEGIN OF ty_cuvtab_fld,
vtint TYPE vtint, " Internal number of variant table
atinn TYPE atinn, " Internal characteristic
vtpos TYPE vtpos, " Item number of characteristic in variant
*mod-012
DBFLD type NAME_FELD,
*mod-012
exist TYPE char1, " X Indictaes characteristic is part of fil
END OF ty_cuvtab_fld.
Store all data in internal table
TYPES: BEGIN OF ty_file,
vtnam TYPE vtnam,
char1 TYPE atwrt,
char2 TYPE atwrt,
char3 TYPE atwrt,
char4 TYPE atwrt,
char5 TYPE atwrt,
char6 TYPE atwrt,
char7 TYPE atwrt,
char8 TYPE atwrt,
char9 TYPE atwrt,
char10 TYPE atwrt,
char11 TYPE atwrt,
char12 TYPE atwrt,
char13 TYPE atwrt,
char14 TYPE atwrt,
char15 TYPE atwrt,
flag TYPE char1,
error TYPE char50,
END OF ty_file.
To check for duplicates
TYPES: BEGIN OF ty_dupl,
vtnam TYPE vtnam,
char1 TYPE atwrt,
char2 TYPE atwrt,
char3 TYPE atwrt,
char4 TYPE atwrt,
char5 TYPE atwrt,
char6 TYPE atwrt,
char7 TYPE atwrt,
char8 TYPE atwrt,
char9 TYPE atwrt,
char10 TYPE atwrt,
char11 TYPE atwrt,
char12 TYPE atwrt,
char13 TYPE atwrt,
char14 TYPE atwrt,
char15 TYPE atwrt,
slnid TYPE slnid,
END OF ty_dupl.
Get previously loaded characteristic values for internal table (CHAR)
TYPES: BEGIN OF ty_cuvtab_valc,
vtint TYPE vtint, " Internal number of variant table
slnid TYPE slnid, " Key for value combination in variant tab
atinn TYPE atinn, " Internal characteristic
valc TYPE atwrt, " Characteristic Value
END OF ty_cuvtab_valc.
Get previously loaded characteristic values for internal table (NUM)
TYPES: BEGIN OF ty_cuvtab_valn,
vtint TYPE vtint, " Internal number of variant table
slnid TYPE slnid, " Key for value combination in variant tab
atinn TYPE atinn, " Internal characteristic
val_from TYPE atflv, " Internal floating point from
END OF ty_cuvtab_valn.
Store column positions of characteristics
TYPES: BEGIN OF ty_col_pos,
vtint TYPE vtint, " Internal number of variant table
vtnam TYPE vtnam, " Variant table name
atinn TYPE atinn, "Internal characteristic
atnam TYPE atnam, "Characteristic Name
field TYPE fieldname, "Field name
req TYPE char1, " Required or not
vtpos TYPE vtpos, " Item number of characteristics
END OF ty_col_pos.
Store valid values for characteristics
TYPES: BEGIN OF ty_cawn,
atinn TYPE atinn, " Internal characteristic
atzhl TYPE atzhl, " Int counter
atwrt TYPE atwrt, " Characteristic Value
atflv TYPE atflv, " Internal floating point from
lkenz TYPE lkenz, " Deletion indicator
END OF ty_cawn.
Store error messages for individual lines
TYPES: BEGIN OF ty_error,
vtnam TYPE vtnam, " Variant table name
fname TYPE fieldname, " Fieldname
atnam TYPE atnam, " Characteristic name
atwrt TYPE atwrt, " Characteristic value
row TYPE char5, " Row id
END OF ty_error.
Begin TPR# 4618
To store unique number for variant
TYPES: BEGIN OF ty_vnt_ma,
vtnam TYPE vtnam,
unique_no TYPE ZGTDM_UNQN,
no_chr TYPE ZGTDM_NO_CHR,
END OF ty_vnt_ma.
TYPES: BEGIN OF ty_dbtab,
vtint TYPE vtint,
vtnam TYPE vtnam,
DBTAB_NAME TYPE TABNAME16,
END OF ty_dbtab.
To find out concatenated number for
TYPES: BEGIN OF ty_split,
f1 TYPE char6,
END OF ty_split.
TYPES: BEGIN OF ty_charval,
char TYPE char30,
END OF ty_charval.
TYPES: BEGIN OF TY_DATA,
name TYPE string,
value(15) type c,
END OF TY_DATA.
DATA: I_DATATAB TYPE STANDARD TABLE OF TY_DATA. "#EC NEEDED
TYPES:
TUMLS_MESSTYPE type /SAPDMC/LS_MESSTYPE,
TUMLS_MESSTYPETXT type EDI_TEXT60,
TUMLS_MESSCODE type EDIPMESCOD.
TYPES:
TUMLS_TABNAME TYPE TABNAME, "#EC *
TUMLS_SEGMENT TYPE TABNAME. "#EC *
TYPES:
TUMLS_PATHFILE TYPE /SAPDMC/LS_FILENAME,
TUMLS_FILENAME TYPE /SAPDMC/LS_FILENAME,
TUMLS_FILETEXT TYPE /SAPDMC/LS_FILETEXT.
TYPES:
BEGIN OF type_errorline,
msgty type SYMSGTY,
id type SYMSGID,
msgno type symsgno,
par1 type symsgv,
par2 type symsgv,
par3 type symsgv,
par4 type symsgv,
END OF type_errorline.
TYPES:
type_errortab TYPE SORTED TABLE
OF type_errorline
WITH NON-UNIQUE KEY id msgno par1 par2 par3 par4.
DATA:
LV_LINE2 TYPE REF TO DATA.
GLOBAL INTERNAL TABLES
DATA : i_newinput TYPE STANDARD TABLE OF ty_newinput INITIAL SIZE 0."#EC *
DATA : i_contentheader1 TYPE STANDARD TABLE OF ty_contenthd INITIAL SIZE 0."#EC *
DATA : i_contenttab1 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab2 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab3 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab4 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
DATA : i_contenttab5 TYPE STANDARD TABLE OF ty_contenttab INITIAL SIZE 0."#EC *
DATA : i_E1CUV1M TYPE STANDARD TABLE OF E1CUV1M INITIAL SIZE 0."#EC *
DATA : i_errortab TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
GLOBAL WORK AREAS
**Internal Table for the structure TY_T001L
DATA : wa_vartab TYPE ty_vartab. "#EC *
DATA : wa_vartabdate TYPE ty_vartabdate. "#EC *
DATA : wa_vardetails TYPE ty_vardetails. "#EC *
DATA : wa_tabinput TYPE ty_tabinput. "#EC *
DATA : wa_dsninput TYPE ty_dsninput. "#EC *
DATA : wa_newinput TYPE ty_newinput. "#EC *
DATA : wa_gnewinput TYPE ty_newinput. "#EC *
DATA : wa_ginput_data TYPE ty_newinput. "#EC *
DATA : wa_final TYPE ty_final. "#EC *
DATA : wa_content TYPE ty_content. "#EC *
DATA : wa_contenthd TYPE ty_contenthd. "#EC *
DATA : wa_contentheader type ty_contenthd. "#EC *
DATA : wa_contenttab TYPE ty_content. "#EC *
DATA : wa_content1 TYPE ty_content. "#EC *
DATA : wa_contenthd1 TYPE ty_contenthd. "#EC *
DATA : wa_contentheader1 type ty_contenthd. "#EC *
DATA : wa_contenttab1 TYPE ty_content. "#EC *
DATA : wa_contenttab2 TYPE ty_content. "#EC *
DATA : wa_contenttab3 TYPE ty_content. "#EC *
DATA : wa_contenttab4 TYPE ty_content. "#EC *
DATA : wa_contenttab5 TYPE ty_contentTAB. "#EC *
DATA : wa_E1CUVTM TYPE E1CUVTM. "#EC *
DATA : wa_E1CUV1M TYPE E1CUV1M. "#EC *
DATA : wa_E1DATEM TYPE E1DATEM. "#EC *
DATA : wa_error_tab TYPE solisti1. "#EC *
INTERNAL TABLES AND WORK AREAS FOR BDC
*Internal Table to store the data to display the error message
DATA : i_errormsg TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
*Internal Table to store the data to display the error message
DATA : i_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
DATA : itab_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
**Work area to store the data to display the error message
DATA : wa_errormsg TYPE solisti1. "#EC *
**Internal table which will store data for the error log
DATA:i_error_log TYPE STANDARD TABLE OF ty_error_log INITIAL SIZE 0."#EC *
GLOBAL VARIABLES
DATA: G_FILE TYPE string. "#EC *
DATA : g_ctr_input_recs(5) type c. "#EC *
DATA: g_ctr_output_recs(5) type p. "#EC *
data : g_msg(100) type c. "#EC *
data: g_struct_file TYPE string. "#EC *
data: g_login type FILEINTERN. "#EC *
data: g_phyin type string. "#EC *
DATA: g_lprnt type RSPOPSHORT. "#EC *
DATA: g_FNAME1 TYPE STRING. "#EC *
DATA : g_repid TYPE repid, "#EC *
g_exit(1) TYPE C, "#EC *
gx_variant type disvariant. "#EC *
DATA : g_lines TYPE i . "#EC *
data : g_save(1) type c. "#EC *
DATA : g_splid TYPE rspoid . "#EC *
data: p_login type FILEINTERN. "#EC *
data: p_phyin type string. "#EC *
GLOBAL CONSTANTS
CONSTANTS c_msgar TYPE rslgarea VALUE 'F8'. "#EC *
CONSTANTS c_msgid TYPE rslgsubid VALUE 'E'. "#EC *
CONSTANTS c_urgnc TYPE char04 VALUE 'HIGH'. "#EC *
CONSTANTS C_X(1) TYPE C VALUE 'X'. "#EC *
CONSTANTS C_Y(1) TYPE C VALUE 'Y'. "#EC *
CONSTANTS C_Z(1) TYPE C VALUE 'Z'. "#EC *
CONSTANTS C_E(1) TYPE C VALUE 'E'. "#EC *
CONSTANTS C_SAP(3) TYPE C VALUE 'SAP'. "#EC *
CONSTANTS C_MOD(3) TYPE C VALUE 'MOD'. "#EC *
CONSTANTS C_MD1(3) TYPE C VALUE 'MD1'. "#EC *
CONSTANTS C_MD2(3) TYPE C VALUE 'MD2'. "#EC *
CONSTANTS C_MD3(3) TYPE C VALUE 'MD3'. "#EC *
CONSTANTS C_MD4(3) TYPE C VALUE 'MD4'. "#EC *
CONSTANTS C_MD5(3) TYPE C VALUE 'MD5'. "#EC *
constants: c_000001(6) type c value '000001', "#EC *
c_e1cuv1m(7) type c value 'E1CUV1M', "#EC *
c_02(2) type c value '02', "#EC *
c_009(3) type c value '009', "#EC *
c_0001(4) type c value '0001'. "#EC *
constants: c_e1datem(7) type c value 'E1DATEM'. "#EC *
constants: c_e1cuvtm(7) type c value 'E1CUVTM'. "#EC *
GLOBAL INTERNAL TABLES FOR ALV DISPLAY
*Internal tables for ALV Field cat
DATA :
i_fieldcat_ov TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
i_fieldcat_dtl TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
i_fieldcat_ov1 TYPE lvc_t_fcat, "#EC *
i_events TYPE slis_t_event. "#EC *
GLOBAL WORK AREAS FOR ALV DISPLAY
*Work area for ALV Field layout
DATA : wa_layout TYPE slis_layout_alv. "#EC *
*Work area for Field Cat. Table
DATA : wa_fieldcat TYPE slis_fieldcat_alv. "#EC *
GLOBAL VARIABLES FOR ALV DISPLAY
DATA : g_event TYPE slis_t_event. "#EC *
DATA : g_top_of_page TYPE slis_t_listheader. "#EC *
DATA : g_ok_code TYPE char4. "#EC *
DATA : g_variant type disvariant. "#EC *
GLOBAL CONSTANTS FOR ALV DISPLAY
BAL handling
data: iv_log_handle type BALLOGHNDL. "#EC *
data: is_log_header type bal_s_log. "#EC *
data: iv_object type bal_s_log-object value 'CAPI'. "#EC *
data: iv_subobject type bal_s_log-subobject value 'CAPI_LOG'."#EC *
data: iv_tcode type bal_s_log-altcode value 'SE38'. "#EC *
*MOD-005
RANGES:
R_MESTYP FOR EDIDC-MESTYP, "#EC *
R_CREDAT FOR EDIDC-CREDAT, "#EC *
R_CRETIM FOR EDIDC-CRETIM, "#EC *
R_SNDPRT FOR EDIDC-SNDPRT, "#EC *
R_SNDPRN FOR EDIDC-SNDPRN. "#EC *
DATA:
L_MESSTYPE TYPE TUMLS_MESSTYPE. "#EC *
*MOD-005
data: p_sndprn TYPE EDI_SNDPRN, "#EC *
p_sndprt TYPE EDI_SNDPRT, "#EC *
p_sndpor TYPE EDI_SNDPOR. "#EC *
data: p_rcvprn TYPE EDI_RCVPRN, "#EC *
p_rcvprt TYPE EDI_RCVPRT, "#EC *
p_rcvpor TYPE EDI_RCVPOR. "#EC *
data:
init_E1CUVTM type E1CUVTM, "#EC *
prev_E1CUVTM type E1CUVTM, "#EC *
init_E1DATEM type E1DATEM, "#EC *
prev_E1DATEM type E1DATEM, "#EC *
init_E1CUV1M type E1CUV1M, "#EC *
prev_E1CUV1M type E1CUV1M. "#EC *
Source structure definitions
data:
begin of LSMW_TAB_CONTENT, "#EC *
VTNAM(018) type C,
CHAR1(030) type C,
CHAR2(030) type C,
CHAR3(030) type C,
CHAR4(030) type C,
CHAR5(030) type C,
CHAR6(030) type C,
CHAR7(030) type C,
CHAR8(030) type C,
CHAR9(030) type C,
CHAR10(030) type C,
CHAR11(030) type C,
CHAR12(030) type C,
CHAR13(030) type C,
CHAR14(030) type C,
CHAR15(030) type C,
FLAG(001) type C,
end of LSMW_TAB_CONTENT.
Counters
data:
g_cnt_VAR_TAB type i, "#EC *
g_cnt_TAB_CONTENT type i. "#EC *
Counter ct_xxxxxxxxxx: number of transferred records
data:
ct_edi_dc40 type i, "#EC *
cs_edi_dc40 type i, "#EC *
ct_E1CUVTM type i, "#EC *
cs_E1CUVTM type i, "#EC *
ct_E1DATEM type i, "#EC *
cs_E1DATEM type i, "#EC *
ct_E1CUV1M type i, "#EC *
cs_E1CUV1M type i. "#EC *
Global data definitions and data declarations
DATA: wa_cabn TYPE ty_cabn,
wa_cawn TYPE ty_cawn,
wa_file TYPE ty_file,
wa_vtnam TYPE ty_vtnam,
wa_cuvtab_fld TYPE ty_cuvtab_fld,
wa_cuvtab_valn TYPE ty_cuvtab_valn,
wa_cuvtab_valc TYPE ty_cuvtab_valc,
wa_col_pos TYPE ty_col_pos,
wa_error TYPE ty_error,
wa_dupl TYPE ty_dupl,
wa_dupl_file TYPE ty_dupl.
DATA: wa_vnt_ma TYPE ty_vnt_ma,
wa_split TYPE ty_split.
DATA: wa_charval TYPE ty_charval. "#EC *
Internal table
DATA: i_cabn TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_cabn_temp TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_cabn_atinn TYPE STANDARD TABLE OF ty_cabn, "#EC *
i_file TYPE STANDARD TABLE OF ty_file, "#EC *
i_file_tmp TYPE STANDARD TABLE OF ty_file, "#EC *
i_vtnam TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_cuvtab TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_cuvtab_fld TYPE STANDARD TABLE OF ty_cuvtab_fld, "#EC *
i_cuvtab_valn TYPE STANDARD TABLE OF ty_cuvtab_valn, "#EC *
i_cuvtab_valc TYPE STANDARD TABLE OF ty_cuvtab_valc, "#EC *
i_col_pos TYPE STANDARD TABLE OF ty_col_pos, "#EC *
i_cawn TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_n TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_c TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cawn_i TYPE STANDARD TABLE OF ty_cawn, "#EC *
i_cuv_error TYPE STANDARD TABLE OF ty_vtnam, "#EC *
i_dupl TYPE STANDARD TABLE OF ty_dupl, "#EC *
i_dbtab TYPE STANDARD TABLE OF ty_dbtab. "#EC *
DATA: i_vnt_ma TYPE STANDARD TABLE OF ty_vnt_ma, "#EC *
i_split TYPE STANDARD TABLE OF ty_split. "#EC *
DATA: i_dupl_file TYPE STANDARD TABLE OF ty_dupl. "#EC *
DATA: i_charval TYPE STANDARD TABLE OF ty_charval. "#EC *
Constants
CONSTANTS: c_char TYPE atfor VALUE 'CHAR', "#EC *
c_date TYPE atfor VALUE 'DATE', "#EC *
c_time TYPE atfor VALUE 'TIME', "#EC *
c_varcond TYPE atnam VALUE 'Z_VARCOND'. "#EC *
Field Symbols
FIELD-SYMBOLS: <fs_vtnam> TYPE ty_vtnam, "#EC *
<fs_cabn> TYPE ty_cabn, "#EC *
<fs_cuvtab_fld> TYPE ty_cuvtab_fld, "#EC *
<fs_dupl> TYPE ty_dupl. "#EC *
FIELD-SYMBOLS: <FS_DYN_WA> TYPE ANY.
Variables
DATA: g_raw(500) TYPE c, "#EC *
g_invalid TYPE char1, "#EC *
g_error TYPE char1, "#EC *
g_message TYPE char50, "#EC *
g_slnid_c TYPE slnid, "#EC *
g_slnid_n TYPE slnid, "#EC *
g_row TYPE char5. "#EC *
DATA: g_varcond TYPE varcond, "Variant condition "#EC NEEDED
g_split_var TYPE i, "#EC *
g_split_var1 type i. "#EC *
Types: begin of ty_charname,
name type atnam,
end of ty_charname.
data: wa_charname type ty_charname, "#EC *
i_charname type standard table of ty_charname. "#EC *
data: cnt_i type i, "#EC *
g_tabix type char10. "#EC *
Types: begin of ty_itab_zedidc40.
include structure edi_dc40.
TYPES: end of ty_itab_zedidc40.
Types: begin of ty_itab_zedidd40.
include structure edi_dd40.
TYPES: end of ty_itab_zedidd40.
DATA: itab_zedidc40 type standard table of
ty_itab_zedidc40 initial size 0. "#EC *
DATA: itab_zedidd40 type standard table of
ty_itab_zedidd40 initial size 0. "#EC *
DATA: wa_itab_zedidc40 type ty_itab_zedidc40. "#EC NEEDED
DATA: wa_itab_zedidd40 type ty_itab_zedidd40.
*MOD-009
data: itab_ze1cuvtm type e1cuvtm, "#EC *
itab_ze1datem type e1datem, "#EC *
itab_ze1cuv1m type e1cuv1m. "#EC *
data: wdocnum(16) type n value 0. "#EC *
data: wsegnum(6) type n value 0. "#EC *
data: witemno(10) type n value 0. "#EC *
data: witemno_new(10) type n value 0. "#EC *
data: witemno_gst(10) type n value 0. "#EC *
data: witemno_qst(10) type n value 0. "#EC *
TYPES: BEGIN OF ty_input_data1, "#EC *
line(560) type c,
flag(1) type c,
END OF ty_input_data1.
DATA: i_input_data type standard table of
ty_input_data1 initial size 0. "with header line.
DATA: i_input_data1 type standard table of
ty_input_data1 initial size 0. "with header line.
DATA: wa_input_data type ty_input_data1. "#EC *
DATA: g_cnt_input_recs type i. "#EC *
DATA: g_flg_error type c. "#EC *
DATA: l_lines type i. "#EC *
DATA: l_lines1 type i. "#EC *
DATA: l_tabix type i. "#EC *
DATA: wa_input_data1 type ty_input_data1. "#EC *
DATA: FILE TYPE STRING.
Fields that are made available to the user:
DATA:
g_cnt_records_read TYPE i, "#EC *
g_cnt_records_transferred TYPE i, "#EC *
g_cnt_transactions_read TYPE i, "#EC *
g_cnt_transactions_transferred TYPE i, "#EC *
g_cnt_idocs_package TYPE i. "#EC *
data: v_log_handle type balloghndl. "#EC *
DATA: gt_curr_edi_dc40 TYPE STANDARD TABLE OF edi_dc40 initial size 0."#EC *
DATA: gt_curr_edi_dd40 TYPE STANDARD TABLE OF edi_dd40 initial size 0."#EC *
DATA: wa_curr_edi_dc40 TYPE edi_dc40. "#EC *
DATA: wa_curr_edi_dd40 TYPE edi_dd40. "#EC *
internal table for error messages during conversion
DATA: g_error_tab TYPE type_errortab, "#EC *
wa_errortab TYPE type_errorline. "#EC *
DATA: g_edidd_segnam type EDI4SEGNAM, "#EC *
g_edidd_hlevel type EDI4HLEVEC. "#EC *
DATA: g_segnum(6) TYPE n.
DATA: g_objecttype(2) type C.
DATA: P_FNAME(128) TYPE C VALUE '/usr/sap/trans/vartabheader'. " MODIF ID MD1 OBLIGATORY.
DATA: P_FNAME1(128) TYPE C VALUE '/usr/sap/trans/vartabcontent'. " MODIF ID MD1 OBLIGATORY.
field-symbols: <dyn_table> type standard table,
<dyn_table1> type standard table,
<dyn_wa>,
<dyn_wa1> TYPE ANY.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
data: l_tabname TYPE tabname.
DATA: l_len_slnid TYPE i, "#EC NEEDED
l_len_varcond TYPE i, "#EC NEEDED
l_temp_slnid TYPE i, "#EC NEEDED
l_temp_slnc TYPE char5, "#EC NEEDED
l_temp_varcond TYPE varcond, "#EC NEEDED
l_sub_var TYPE i, "#EC NEEDED
l_val_split TYPE char10. "#EC NEEDED
DATA: l_invalid. "#EC NEEDED
*Include for Global Data Declaration
*INCLUDE ZGTDMI_VARTAB_TOPDYN.
*INCLUDE /FACTGLB/GTDMI_VARTAB_TOP02.
*Include for Selection Screen
*INCLUDE ZGTDMI_VARTAB_SELDYN.
*INCLUDE /FACTGLB/GTDMI_VARTAB_SEL02.
*Include for Sub Routines
*INCLUDE ZGTDMI_VARTAB_FORMSDYN.
*INCLUDE /FACTGLB/GTDMI_VARTAB_FORMS02.
*& Include /FACTGLB/GTDMI_VARTAB_SEL02 *
*& Include /FACTGLB/GTDMI_VARTAB_SEL
*& Include /FACTGLB/GTDMI_VARTAB_SEL
PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
DEVELOPER: Aveek Ghose
CREATION DATE: 2008-08-25
RDD NUMBER: DCDD027
TRANSPORT NUMBER(S): RD2K902769
*-- REVISION HISTORY -
DEVELOPER:
DATE APPLIED: YYYY-MM-DD
SCR NUMBER: <Scope Change Request ID>
RDD NUMBER: <Toolset Object ID>
TRANSPORT NUMBER(S):
DESCRIPTION:
DECLARATION FOR SELECTION SCREEN
*selection-screen skip 1.
*For all the input field entries
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
*Parameter for Input File Name:
PARAMETERS: p_inpt TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File Variant table
PARAMETERS: p_inpt1 TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File variant Content
SELECTION-SCREEN END OF BLOCK bl1.
IDoc creation
selection-screen begin of block idocpars
with frame title text-006.
parameters:
p_trfcpt as checkbox default C_X MODIF ID MD3,
p_packge(5) type n default 1 MODIF ID MD3.
selection-screen end of block idocpars.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-032.
Radio Buttons :
parameters:
rb_apsrv RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND UCOM,
rb_convt RADIOBUTTON GROUP RB1,
rb_idoc RADIOBUTTON GROUP RB1.
rb_proc RADIOBUTTON GROUP RB1.
SELECTION-SCREEN END OF BLOCK bl3.
INITIALIZATION
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INPT.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
STATIC = C_X
CHANGING
FILE_NAME = P_INPT
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE e241.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INPT1.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
STATIC = C_X
CHANGING
FILE_NAME = P_INPT1
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
-
Function module to get Structure components
Hi friends,
is there a function module to get structure components,if we give a structure name.
regards
kaushikSample program using the function module.
report zrich_0003.
types: begin of type_item,
f1(3),
f2(3),
f3(3),
f4(3),
end of type_item.
types: begin of type_data,
data(800),
end of type_data.
data: lineitems type table of type_item with header line,
t_output type table of type_data with header line,
fieldlist type table of rstrucinfo with header line,
fieldsym type table of rfieldlist with header line.
data: syrepid type sy-repid.
data: fieldname like fieldlist-compname,
data_line type type_data.
field-symbols : <fs1> type any,
<fs2> type any.
lineitems-f1 = 'a1'.
lineitems-f2 = 'a2'.
lineitems-f3 = 'a3'.
lineitems-f4 = 'a4'.
append lineitems.
lineitems-f1 = 'b1'.
lineitems-f2 = 'b2'.
lineitems-f3 = 'b3'.
lineitems-f4 = 'b4'.
append lineitems.
lineitems-f1 = 'c1'.
lineitems-f2 = 'c2'.
lineitems-f3 = 'c3'.
lineitems-f4 = 'c4'.
append lineitems.
lineitems-f1 = 'd1'.
lineitems-f2 = 'd2'.
lineitems-f3 = 'd3'.
lineitems-f4 = 'd4'.
append lineitems.
syrepid = sy-repid.
* Gets all of the global data types.
call function 'GET_GLOBAL_SYMBOLS'
exporting
program = syrepid
tables
fieldlist = fieldsym.
* gets all of the components of a structure
call function 'GET_COMPONENT_LIST'
exporting
program = syrepid
fieldname = 'lineitems'
tables
components = fieldlist.
format color 3.
loop at lineitems assigning <fs2> .
loop at fieldlist.
fieldname = fieldlist-compname .
assign component fieldname of structure <fs2> to <fs1>.
concatenate data_line <fs1> into data_line .
endloop.
append data_line to t_output.
clear data_line.
endloop.
loop at t_output.
write:/ t_output.
endloop.
Regards,
Rich Heilman -
Creating a structure, knowing the name and the type of the components
hi, following problem:
i have uploaded an excel file from a different system with the information about the names and the types of the components of several structures.
how can i create a structure with this informatin on my system?ok, i think i have to give you some more details:
i want to update a table from a table saved on another system using a report.
(only inserts are important, no updates)
the problem is, that tables may not have the same components.
therefore i have created several excel sheets with following content (using mehtod gui_download):
name1 ; name2 ; name3.... | name of the component
typ1 ; typ2 ; typ3 ... | type of the component
content11 ; content12 ; content13
content21 ; content22 ; content23
uploading the file into table <uploadtable>
now need dynamic structure: let' s say dynamicwa
name1 typ1
name2 type2
then: loop at <uploadtable> into dynamicwa.
move-corresponding dynamicwa to destinationwa.
insert destination_wa into destination_table.
endloop.
but how can i create this dynamicwa?
Message was edited by: Michael
Michael Dirndorfer -
Hi,
I want to use the FM "FKK_LINE_ITEMS_WITH_SELECTIONS" for creating one Z-Account statement to display same like chronology-FPL9. So while calling this FM, I am passing the structure "FKKEPOSC". But I guess some mandatory fields/components I am missing there so that I am getting error F4-420 No data for selections.
So can you please share the require mandatory components for this structure "FKKEPOSC" for successful call of this FM?
Regards,
AkhilHi Vandana,
Use the following FM's and Use type-pools: SLIS
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOCK_LIST_INIT
REUSE_ALV_COMMENTARY_WRITE
REUSE_ALV_EVENTS_GET
REUSE_ALV_EVENTS_TRANSFER
REUSE_ALV_EVENT_NAMES_GET
REUSE_ALV_FIELDCATALOG_MERGE
REUSE_ALV_POPUP_TO_SELECT
Regards
Kannaiah -
How to move components in Structure
I'm following the tutorial - Create ADF Menus for Page Navigation. I accidentaly skipped a step, Add and Bind Bread Crumbs Component. So I went back and tried to add this in. It shows up inthe structure window but not in the diagram. And my structure looks a little mixed up; some components aren't in the right place. I'm trying to drag the items in the structure window to the correct position. I guess I should be moving these components to the right facet. Does that make sense? The ADF concepts are very cool but I am having difficulty working with JDev. Is there a relatively easy way the get the structure cleaned up? (Or a good reference?) Clicking zillions of items is not too intuitively obvious (to me). Thanks.
I don't know if there were errors in the source since I replaced the code with the sample code. Next time I will look if I have similar problems. I was trying to move components in the structure window but wasn't able to get the hierarchy right. This is a generic question about manipulating components in the structure window. Maybe I just need more practice. Thanks.
-
Dynamic Field Symbols with Structures
Hello,
I am stuck on a piece of code and looking for some help. I am trying to figure out how to assign values in a structure of a dynamically defined field symbol to the structure inside another dynamically defined field symbol. Here is my code and some comments. Basically I am uploading data via a flatfile and placing it into a dynamically defined field symbol.
DATA:
lr_area TYPE REF TO cl_sem_planarea_attributes,
lr_t_data TYPE REF TO data,
lr_s_data TYPE REF TO data,
lr_s_chas TYPE REF TO data,
lr_s_kyfs TYPE REF TO data.
FIELD-SYMBOLS:
<lt_data> TYPE STANDARD TABLE,
<ls_data> TYPE ANY,
<ls_chas> TYPE ANY,
<ls_kyfs> TYPE ANY.
DATA: ls_chasel TYPE upc_ys_chasel,
ls_charng TYPE upc_ys_charng.
FIELD-SYMBOLS:
<f> TYPE ANY,
<chas> TYPE TABLE,
<kyfs> TYPE ANY.
CALL METHOD cl_sem_planarea_attributes=>get_instance
EXPORTING i_area = i_area
RECEIVING er_instance = lr_area.
CHECK sy-subrc = 0.
CREATE DATA lr_s_data TYPE (lr_area->typename_s_data).
ASSIGN lr_s_data->* TO <ls_data>.
CREATE DATA lr_t_data TYPE (lr_area->typename_t_data).
ASSIGN lr_t_data->* TO <lt_data>.
CREATE DATA lr_s_chas TYPE (lr_area->typename_s_chas).
ASSIGN lr_s_chas->* TO <ls_chas>.
CREATE DATA lr_s_kyfs TYPE (lr_area->typename_s_kyfs).
ASSIGN lr_s_kyfs->* TO <ls_kyfs>.
LOOP AT gt_file INTO ls_file.
CLEAR <ls_data>.
MOVE-CORRESPONDING ls_file TO <ls_kyfs>. " Map key figures
MOVE-CORRESPONDING ls_file TO <ls_chas>. " Map chars
* MOVE-CORRESPONDING ls_file TO <ls_data>. " Map data
* ASSIGN COMPONENT 'ls_chas' OF STRUCTURE <ls_Data> TO <chas> .
* IF sy-subrc = 0.
** <chas> = <ls_chas>.
*MOVE-CORRESPONDING <ls_chas> to <chas>.
* ENDIF.
<chas> = <ls_chas>.
LOOP AT <chas> INTO ls_chasel.
READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.
IF sy-subrc = 0 AND ls_charng-option = 'EQ'.
ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE <ls_chas> TO <ls_data>.
IF sy-subrc = 0.
<ls_data> = ls_charng-low.
ENDIF.
ENDIF.
ENDLOOP.
COLLECT <ls_data> INTO <lt_data>.
ENDLOOP.
Ls_chasel has 2 components:
Chanm (a char 30 which contains the component’s name)
T_CHARNG (a table with values for chanm)
Ls_data has 2 components:
S_chas (a structure with a list of components and values – same list as would have)
S_kyfs (a structure with a list of components and values – same list as would have)
Lt_data is a table of ls_data
I need to get the data in ls_chas into the ls_chas structure of ls_data and the ls_kyfs data into the ls_kyfs structure of ls_chas and append ls_chas to lt_data. Anything that is commented out is something I tried that didn't work. RIght now I get a dump at the 'loop at <chas> into ls_chasel' that the field symbol is not assigned.
Thanks for your help!It looks like the the original poster didn't completely understand all he was doing. (This is why I always recommend getting an ABAP programmer in for what is, essentially, advanced ABAP programming, rather than someone "kind of familiar" with ABAP trying it - we're often available at very reasonable rates ).
It seems he's using ito_chasel to set the fixed values (which is in fact quite smart!). What isn't required, so far as I can tell without implementing, are any of the statements involving <ls_kyfs> or <ls_chas>.
The following should be sufficient (with the necessary declarations etc. - but really: omit <ls_kyfs> and <ls_chas> - I'm sure they're not needed and they confuse things).
" Go through the data from the flat file
LOOP AT gt_file INTO ls_file.
CLEAR <ls_data>.
" Transfer the characteristics
MOVE-CORRESPONDING ls_file TO <s_chas>.
" Transfer the key figure
MOVE-CORRESPONDING ls_file TO <s_kyfs>.
" Go through the fixed characteristic selections from the package
LOOP AT ito_chasel INTO ls_chasel.
" We only care about the first value (if there is one).
READ TABLE ls_chasel-s_charng INTO ls_charng INDEX 1.
" Check there is a first value and that it is fixed
CHECK sy-subrc IS INITIAL AND ls_charng EQ 'EQ'.
" Get access to that characteristic
FIELD-SYMBOLS <fixed_value> TYPE ANY.
ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE <s_chas> TO <fixed_value>.
" Make sure that it exists in the data structure
CHECK sy-subrc IS INITIAL.
" Set the value
<fixed_value> = ls_charng-low.
ENDLOOP.
COLLECT <ls_data> INTO <lt_data>.
ENDLOOP. -
Create Dynamic Structure at Runtime via ALV-Methods!
Hi Experts,
i try to create at the ABAP Runtime a new Structure.
FOR EXAMPLE: I have a internal Table "database" and i dont know their Structure or Typ.
MY Question: How can i get the structuretype for this internal Table "database" ??
I thought that it is possible with ALV-Methods, but i dont find the right way.
First Step: I must get the structure of this internal Table.
Second Step: I must create a workarea/ line of this internal Table, that i can work row for row with the table.
Have someone an code example for me, because iám very confused about this Problem.
With kind regards.
Ersin TosunHello,
For this specific requirement, SAP has provided RTTI class.
Below is a code snippet for your ready reference. In this example we're trying to get the structure of the dynamic table <ITAB> whose structure is not defined till run-time.
TYPE-POOLS: abap.
PARAMETERS: p_table TYPE tabname.
DATA: dref TYPE REF TO data.
FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
CREATE DATA dref TYPE STANDARD TABLE OF (p_table).
ASSIGN dref->* TO <itab>.
DATA: go_tab_descr TYPE REF TO cl_abap_tabledescr,
go_struc_descr TYPE REF TO cl_abap_structdescr,
wa_comp TYPE abap_compdescr.
go_tab_descr ?= cl_abap_tabledescr=>describe_by_data( <itab> ).
CHECK sy-subrc = 0.
go_struc_descr ?= go_tab_descr->get_table_line_type( ).
LOOP AT go_struc_descr->components INTO wa_comp.
WRITE: / wa_comp-name.
ENDLOOP.
I must create a workarea/ line of this internal Table, that i can work row for row with the table.
Sorry i missed the Step 2:
FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
<wa> TYPE ANY,
<val> TYPE ANY.
LOOP AT <itab> ASSIGNING <wa>.
LOOP AT go_struc_descr->components INTO wa_comp.
* To access the components of the structure dynamically
ASSIGN COMPONENT wa_comp-name OF STRUCTURE <wa> TO <val>.
ENDLOOP.
ENDLOOP.
BR,
Suhas
Edited by: Suhas Saha on Nov 18, 2010 7:26 PM -
How to delete the structure created from Tx: EEWB ?
Hi SAP Gurus
I have an issue at hand. I have added three components in the structure <b>BUS000___I</b> and the components are <b>ZZ1, ZZ2, ZZ3</b>, I was following the <b>EEWB</b> wizard and from there these three components were made, now I cannot delete these components directly from <b>SE11</b>. Because after adding these components the system is not allowing me to do so and is asking for the access code.
I am getting a syntax error in all the tx where <b>Business Partner</b> is used. No old versions for this structure was found in the system. The only structure that has come into this BP structure is <b>ZBSTC0000000000</b> followed by three data elements of this structure.
I know the <b>Project and the enhancement</b> that was created and I have tried deleting the enhancement from EEWB but when i try deleting it, it always fall into an intermediate stage where it leaves some entries and due to these left over entries these errors are coming.
Another imp thing is that the structure that i have reported is a newly created one I cannot find this anywhere else. looks like this structure was created after executing the EEWB transaction only.
Now when I try activating the enhancement again the <b>magic wand button</b> used to activate an enhancement and the <b>generate button</b> is also inactive in EEWB and now it is not getting activated, even after rt click enhancement then clicking change or by clicking on the edit-change button on the top tool bar. Do you think if I create another enhancement this button might get activated?
Please let me know how do I delete these components.
Kindly reply at the earliest.
Regards,
AmitHi, I had the similar problem (and here the solution):
Spezifikation: Deletion of EEWB fields manually, error in middleware bdoc,
Kurztext
Deletion of EEWB fields manually, error in middleware bdoc,
Langtext
BDOC-Error from function module BAPI_CRM_SAVE. no further using of the
middleware for sales activities (sales order) possible.
see steps for reconstruction
Schritte zur Rekonstruktion
what done before:
- added one field via transaction code EEWB to business object
SALES_TRANSACTION (Verkaufsvorgang), "Erweiterungstyp CUSTOMER_I
(Positions-Zusatzextension erweitern) with one existing data element
type Z_, Geschäftsvorgangstypen = Verkauf
no selection of "Datenaustausch mit den Mobile Clients",
"Datenaustausch mit R/3 Supply Chain Execution" or
"Business Information Warehouse".
- deleted the extension manually, deleted the eewb project manually
(successful)
- got an short dump on saving a sales order via transaction code
CRMD_ORDER:
dump type: LOAD_TYPE_VERSION_MISMATCH
Der Abbruch trat im ABAP-Programm "SAPLCRM_UPLOAD" auf, und zwar in
"CRM_UPLOAD_BUS_TRANS_MSG". Das Hauptprogramm war "CRM_1O_FRAME ".
Im Quelltext befindet sich die Abbruchstelle in Zeile 5
des (Include-)Programms "LCRM_UPLOAD$18".
(bei Anwahl des Editors: 50) der ABAP-Source "LCRM_UPLOAD$18".
000040 *********************************************************
FUNCTION $$UNIT$$ CRM_UPLOAD_BUS_TRANS_MSG
000060
000070 IMPORTING
000080 REFERENCE(IV_GUID) TYPE !CRMT_OBJECT_GUID
000090 EXPORTING
000100 REFERENCE(ES_BDOC_HEADER) TYPE !SMW3_FHD
000110 REFERENCE(ES_BDOC_MESSAGE) TYPE !/1CRMG0/BUS_TRANS_MSG
000120 REFERENCE(ES_BUS_TRANS_MSG) TYPE !BAD_BUS_TRANSN_MESSAGE
000130 EXCEPTIONS
000140 !ERROR_OCCURED .
- re-generation of a lot of of function modules
(e.g. CRM_UPLOAD_BUS_TRANS_MSG)
and some corresponding structures (e.g. CRMT_CUSTOMER_I_COM)
- fixed the short dumps with this gereration
Current Errors:
- the crm middleware (mBdoc) cannot copy sales orders from crm to r/3
- via transaction code CRMD_ORDER i copy an existing sales order and
save or try to change just one field and save.
- saving is succesfull (message type s), but on changing again, the
order is locked by middleware
- bdoc in transaction SMW02 is on state yellow "An Empfänger gesendet
(nicht alle haben bestätigt) BUS_TRANS_MSG"
- in transaction code SMW02 occurs:
Mdt Benutzer Funktionsbaustein Queue-Name
100 CPIC_FILO BAPI_CRM_SAVE R3AD_SAL_ERR
Datum Zeit
12.04.2007 17:52:10
Statustext
Inkonsistenz zwischen den DDIC-Typen CRMT_CUSTOMER_I_COMT und ABAP-
genera
SOLUTION:
re-generation of *ALL* code which using structure CRMT_CUSTOMER_I_COMT had solved it. -
How to delete the structure created from EEWB ?
Hi SAP Gurus
I have an issue at hand. I have added three components in the structure <b>BUS000___I</b> and the components are <b>ZZ1, ZZ2, ZZ3</b>, I was following the <b>EEWB</b> wizard and from there these three components were made, now I cannot delete these components directly from SE11. Because after adding these components the system is not allowing me to do so and is asking for the access code.
I am getting a syntax error in all the tx where<b> Business Partner</b> is used. No old versions for this structure was found in the system. The only structure that has come into this <b>BP</b> structure is <b>ZBSTC0000000000</b> followed by three data elements of this structure.
I know the Project and the enhancement that was created and I have tried deleting the enhancement from <b>EEWB</b> but when i try deleting it, it always fall into an intermediate stage where it leaves some entries and due to these left over entries these errors are coming.
Another imp thing is that the structure that i have reported is a newly created one I cannot find this anywhere else. Looks like this structure was created after executing the EEWB transaction only.
Now when I try activating the enhancement again the <b>magic wand button</b> used to activate an enhancement and the <b>generate button</b> is also inactive in EEWB and now it is not getting activated, even after rt click enhancement then clicking change or by clicking on the edit-change button on the top tool bar. Do you think if I create another enhancement this button might get activated?
Please let me know how do I delete these components.
Kindly reply at the earliest.
Regards,
AmitHi Rahul,
thnx for coming again.......
this is the error log that is coming up
Short Descrip Prog ID Obj typ Object name
Function Module LIMU FUNC ZZG00_BUPA_EVENT_DLVE1
Function Module LIMU FUNC ZZG00_BUPA_EVENT_DSAVB
Function Module LIMU FUNC ZZG00_BUPA_EVENT_ISDST
Function Module LIMU FUNC ZZG00_BUPA_EVENT_ISSTA
Function Module LIMU FUNC ZZG00_BUPA_EVENT_XCHNG
Function Module LIMU FUNC ZZG00_BUPA_PAI_ZG000100
Function Module LIMU FUNC ZZG00_BUPA_PAI_ZG000101
Function Module LIMU FUNC ZZG00_BUPA_PAI_ZG000102
Function Module LIMU FUNC ZZG00_BUPA_PBO_ZG000100
Function Module LIMU FUNC ZZG00_BUPA_PBO_ZG000101
Function Module LIMU FUNC ZZG00_BUPA_PBO_ZG000102
Function Module LIMU FUNC ZZTB0000000000T_SELECT_SINGLE
Function Module LIMU FUNC ZZTB0000000000_SELECT_SINGLE
Function Module LIMU FUNC ZZTB0000000001T_SELECT_SINGLE
Function Module LIMU FUNC ZZTB0000000001_SELECT_SINGLE
Function Module LIMU FUNC ZZTB0000000002T_SELECT_SINGLE
Function Module LIMU FUNC ZZTB0000000002_SELECT_SINGLE
Report Source Code LIMU REPS LZZG00BUPAF01
Report Source Code LIMU REPS LZZG00BUPAG24
Report Source Code LIMU REPS LZZG00BUPAG27
Report Source Code LIMU REPS LZZG00BUPAG30
Report Source Code LIMU REPS LZZG00BUPAI00
Report Source Code LIMU REPS LZZG00BUPAI01
Report Source Code LIMU REPS LZZG00BUPAO01
Report Source Code LIMU REPS LZZG00BUPATOP
Report Source Code LIMU REPS SAPLZZG00BUPA
Function Group R3TR FUGR ZZG00BUPA
Function Group R3TR FUGR ZZG00BUPA_VIEW01
Function Group R3TR FUGR ZZG00BUPA_VIEW02
Function Group R3TR FUGR ZZG00BUPA_VIEW03
DataSource (Active Version) R3TR OSOA 0BPARTNER_ATTR
DataSource (Active Version) R3TR OSOA Z_ZBU_00000000_TEXT
DataSource (Active Version) R3TR OSOA Z_ZBU_00000001_TEXT
DataSource (Active Version) R3TR OSOA Z_ZBU_00000002_TEXT
Table R3TR TABL CI_EEW_BUT000_X
Table R3TR TABL ZTB0000000000T
Table R3TR TABL ZTB0000000001T
Table R3TR TABL ZTB0000000002T
Table Contents R3TR TABU TBZ0A
Table Contents R3TR TABU TBZ0B
Table Contents R3TR TABU TBZ0C
Table Contents R3TR TABU TBZ1C
Table Contents R3TR TABU TBZ1F
Table Contents R3TR TABU TBZ3A
Table Contents R3TR TABU TBZ3B
Table Contents R3TR TABU TBZ3C
Table Contents R3TR TABU TBZ3D
Table Contents R3TR TABU TBZ3E
Table Contents R3TR TABU TBZ3F
Table Contents R3TR TABU TBZ3I
Table Contents R3TR TABU TBZ3K
Table Contents R3TR TABU TBZ3R
Table Contents R3TR TABU TBZ3S
Table Contents R3TR TABU TBZ3W
Table Contents R3TR TABU TBZ3X
Table Contents R3TR TABU TDDAT
Table Contents R3TR TABU TVDIR
View Maintenance: Data R3TR VDAT V_TBZ3H
View R3TR VIEW ZTB0000000000V
View R3TR VIEW ZTB0000000001V
View R3TR VIEW ZTB0000000002V
and there is a delete icon by the side of every line but when i try deleting any entry it says object name does not exist.
Please help.
Regards,
Amit -
Simple transformation with reference to ddic structures
Hi, experts,
we decide to use xml as the format when exchanging massive data with other applications. and we want to use simple transformation because according to the document it's more fast.
actually our file structure is determined by certain ddic structures, one xml file main contain several ddic structures , and they are all flat one, not deep structure.
the xml file may look like this:
<data>
<ddic1>[components of ddic structure 1 ]</ddic1>
<ddic2>[components of ddic structure 2 ]</ddic2>
</data>
i am new to ST,i am wondering that is it possible to make the ST more easy with the help of ddic structure? do i still need to declare the components one by one in the ST program?
BR.
junIt only runs ok with 2 internal tables because of the way you set up the XML string. It will run ok with 3 internal tables too. If you strip out the '<C>' nodes or move the '<C>' nodes around, you'll see what I mean (move the C nodes to the last B node). Each time you start a loop in a simple transformation, the internal table is initialized. So, you need to form your sample XML string differently, declare your internal tables differently (nested), or use XSLT for a little more power.
-
Function Module to get all feild names in a structure
Hello Friends,
Is there a function module,where i give the structure name and get all the feild names within that structure.
regards
kaushikHi,
You can use the for run time type descriptor classes to do this :
Here is a simple example :
REPORT z_assign_comp.
TYPE-POOLS : slis.
include <icon>.
"& Dynamic Programming ! Using Structure Descriptior Class. *
DATA: BEGIN OF line OCCURS 0,
col1 TYPE i,
col2(10) TYPE c,
col3 TYPE i,
END OF line.
FIELD-SYMBOLS : <fs> TYPE ANY.
FIELD-SYMBOLS : <itab_line> TYPE ANY.
DATA : BEGIN OF t_comp OCCURS 0,
comp(5) TYPE c,
END OF t_comp.
DATA : l_struc TYPE REF TO cl_abap_structdescr.
DATA : l_typedesc TYPE REF TO cl_abap_typedescr.
DATA : lt_comp TYPE abap_compdescr_tab,
w_comp LIKE LINE OF lt_comp.
line-col1 = 11.line-col2 = 'SAP'.line-col3 = 33.
APPEND line.
line-col1 = 44.line-col2 = 'P.I.'.line-col3 = 66.
APPEND line.
ASSIGN line TO <itab_line>.
"Call the static method of the structure descriptor describe_by_data
CALL METHOD cl_abap_structdescr=>describe_by_data
EXPORTING
p_data = <itab_line>
RECEIVING
p_descr_ref = l_typedesc.
"The method returns a reference of a type descriptor class therefore we
"need to Cast the type descriptor to a more specific class i.e
"Structure Descriptor.
l_struc ?= l_typedesc.
"Use the Attribute COMPONENTS of the structure Descriptor class to get
"the field names of the structure
lt_comp = l_struc->components.
LOOP AT line.
WRITE :/ 'Row : ', sy-tabix.
LOOP AT lt_comp INTO w_comp.
" Using the ASSIGN component ,assigns a data object to a field symbol.
ASSIGN COMPONENT w_comp-name OF STRUCTURE line TO <fs>.
WRITE :/ w_comp-name, ' ', <fs>.
ENDLOOP.
ENDLOOP.
Hope this helps.
regards,
Advait -
Can anybody tell me in detail the difference between logical and physical structure of the database.
Physical means that physically files are stored on the disk. what about logical, why is it used. is it important. with that pl explain me the different components of logical structure like data block, extent, segement, tablespace
Thanks
PrashantDear Prasanth
For ur easy I am giving u the documentation link what ur looking for :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref11
hope it will help u for the same
thanks and regards
Message was edited by:
Shanoj Kumar -
I would like to know how to use nested structure in a ABAP program.
Thanks in Advance!A <b>nested structure</b> is a structure that contains one or more other structures as components.
Flat structures contain only elementary data types with a fixed length
(no internal tables, reference types, or strings).
The term deep structure can apply regardless of whether the structure is nested or not.
Nested structures are flat so long as none of the above types is contained in any nesting level.
Any structure that contains at least one internal table, reference type, or string as a component
(regardless of nesting) is a deep structure.
Accordingly, internal tables, references, and strings are also known as deep data types.
The technical difference between deep structures and all others is as follows:
When you create a deep structure, the system creates a pointer in memory that points to the
real field contents or other administrative information.
When you create a flat data type, the actual field contents are stored with the type in memory.
Since the field contents are not stored with the field descriptions in the case of deep structures,
assignments, offset and length specifications and other operations are handled differently from flat structures.
Kindly check the following link for more information on Nested structures:
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/frameset.htm
<b>Examples:</b>
DATA: BEGIN OF itab.
include structure vbak.
DATA: END OF itab.
DATA: BEGIN OF itab OCCURS 0,
itab1 LIKE mara,
itab2 LIKE vbak,
END OF itab.
Kindly reward points if it helps!
best regards,
Thangesh -
Hi,
this might very well be a C problem, but maybe not, because the program compiles fine and can nicely be executed seperately, it only crashes if used together with JNI. (Anyhow, I am not a C expert.)
Okay, i am trying to make some third party C-code accessible from Java.
The problem are lines like:
for (i=0; i<linkage->num_words; ++i) {
or
for (i=0; i<linkage->num_sublinkages; ++i) {
these lines cause JVM to just crash. The problem is that I seem not to be able to access the components of the structure "linkage". The JVM just goes down. As mentioned, the code compiles, and can be run as an executable without any problems.
It might very well be that these components are not yet defined (I am checking whether "linkage != NULL" before executing the above lines, however. Is this the correct way to do it?). As mentioned, I am irritated by the fact that the program works fine as an executable but not when called from Java.
Anyone any ideas?
Thanks a lot,
MichaelWhat kind of error text JVM displayed after crash? IHere's the output:
# An unexpected error has been detected by HotSpot Virtual Machine:
# SIGSEGV (0xb) at pc=0xb143fb54, pid=17935, tid=3086645936
# Java VM: Java HotSpot(TM) Client VM (1.5.0_10-b03 mixed mode, sharing)
# Problematic frame:
# C [libde_mk_qualim_parser_LinkParser.so+0x22b54] linkage_delete+0x31
--------------- T H R E A D ---------------
Current thread (0x0919b7f0): JavaThread "main" [_thread_in_native, id=17935]
siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x4c8bda89
Registers:
EAX=0x4c8bda89, EBX=0x8c930d68, ECX=0x00000006, EDX=0x00ca70b0
ESP=0xbfeb7174, EBP=0xbfeb719c, ESI=0x8c930d68, EDI=0x0919b7f0
EIP=0xb143fb54, CR2=0x4c8bda89, EFLAGS=0x00010296
Top of Stack: (sp=0xbfeb7174)
0xbfeb7174: b144f024 00000001 00000006 00ca64c0
0xbfeb7184: 00000006 00000006 b7fa7ab0 8c930d68
0xbfeb7194: 8c930d68 0919b7f0 bfeb71bc b142d09d
0xbfeb71a4: 4c8bda89 00000001 00000006 00ca64c0
0xbfeb71b4: 8c930d68 0919b7f0 bfeb71dc b142cb59
0xbfeb71c4: 098f7778 bfeb721c 00000000 0919b7f0
0xbfeb71d4: bfeb720c b25823cd bfeb720c b25824eb
0xbfeb71e4: 0919b8b0 bfeb7220 bfeb721c bfeb71f0
Instructions: (pc=0xb143fb54)
0xb143fb44: 00 c7 04 24 24 f0 44 b1 e8 27 97 c0 56 8b 45 08
0xb143fb54: 83 38 00 7e 5c bb 00 00 00 00 be 00 00 00 00 a1
Stack: [0xbfcbb000,0xbfebb000), sp=0xbfeb7174, free space=2032k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libde_mk_qualim_parser_LinkParser.so+0x22b54] linkage_delete+0x31
C [libde_mk_qualim_parser_LinkParser.so+0x1009d] LinkAPI_submitNewSentence+0x57
C [libde_mk_qualim_parser_LinkParser.so+0xfb59]
almost sure linkage pointer is uninitialised.Yes, I now think the same! But how can I check this in C?
And mind that the compiled executable can be run without errors.
Cheers,
Michael
Maybe you are looking for
-
2.0.1 dropped audio with Alpine iDA-X200 car stereo
So after about 20 minutes of playback, the iPhone will 'drop audio' for a brief moment .. enough to be annoying. When the iPhone was running 1.1.4 of the OS, I never had the dropped audio problem. But ever since I 'upgraded' to 2.0(and 2.0.1), the dr
-
Max No. of records in a table - performance related statistics of a table
Hi all, Can anybody please help me on the performance related statistics depending upon the size of the table? I have a question regarding the scalability and(I think so) and performance. My record is having 20 columns and all columns together it wil
-
What happen to the "info tab" in iTunes V11.1.3?
The "info tab" in the latest version of iTunes is no where to be found. Unable to sync Mail, Contact and Calender!
-
Help!!! CS4 freezes over and over again
Hello, my Photoshop CS4 all the sudden starts to freeze, sometimes on even opening a jpg, sometimes when resizing an image, sometimes when I use the lasso tool, for no apparent reason. Its so bad that at times it freezes my complete pc. At first I ha
-
Hi all, Can you throw some light on a requirement for a client of mine, on the isco's IP camera Products for monitoring hi Pharma Research Labs, spread over a 3000 s. mtr area. rgds, Durai, Bangalore, India