2007 Jul 18 5:42 PM
There is an error when running this code below: @8O@ Définitions globales The data object "ZR_BASELINE" has no structure and therefore no component called "SIGN".
please help in fixing this error (how to use this zr_baseline).
-
-
FORM rech_baseline_art_tete TABLES zr_baseline
USING z_cuobj LIKE lips-cuobj
z_t_poste LIKE mara-matnr
CHANGING z_existe
z_baseline_config TYPE atinn.
TYPE-POOLS : ibco2.
DATA : wlt_instance TYPE ibco2_instance_rec2 OCCURS 0 WITH HEADER LINE,
wlt_values LIKE ibvalue0 OCCURS 0 WITH HEADER LINE,
wl_baseline LIKE ibvalue0-atinn.
CLEAR wlt_instance.
REFRESH wlt_instance.
CALL FUNCTION 'CUCB_GET_SINGLE_INSTANCE'
EXPORTING
instance = z_cuobj
IMPORTING
instance_rec = wlt_instance
EXCEPTIONS
invalid_instance = 1
instance_is_a_classification = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR wlt_instance.
SORT wlt_instance BY conf-klart type_of-object_type type_of-object_key
.
READ TABLE wlt_instance WITH KEY conf-klart = '300'
type_of-object_type = 'MARA'
type_of-object_key = z_t_poste
BINARY SEARCH.
IF sy-subrc <> 0.
z_existe = 'X'.
EXIT.
ENDIF.
*Format interne de BASELINE
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input = 'BASELINE'
IMPORTING
output = wl_baseline.
SORT wlt_values BY atinn.
CLEAR wlt_values.
READ TABLE wlt_values WITH KEY atinn = wl_baseline
BINARY SEARCH.
IF sy-subrc <> 0
OR ( wlt_values-atwrt IS INITIAL
AND wlt_values-atflv IS INITIAL
AND wlt_values-atflb IS INITIAL ).
*Caractéristique non trouvée ou données configuration absentes
z_existe = 'X'.
EXIT.
ENDIF.
IF NOT wlt_values-atwrt IS INITIAL.
*Retenir la baseline.
z_baseline_config = wlt_values-atwrt.
ELSE.
*Alimenter le ranges selon l''existance de ATFLV et ATFLB
IF NOT wlt_values-atflv IS INITIAL AND
NOT wlt_values-atflb IS INITIAL.
zr_baseline-sign = 'I'.
zr_baseline-option = 'BT'.
zr_baseline-low = wlt_values-atflv.
zr_baseline-high = wlt_values-atflb.
ELSEIF NOT wlt_values-atflv IS INITIAL.
zr_baseline-sign = 'I'.
zr_baseline-option = 'GE'.
zr_baseline-low = wlt_values-atflv.
ELSEIF NOT wlt_values-atflb IS INITIAL.
zr_baseline-sign = 'I'.
zr_baseline-option = 'LE'.
zr_baseline-low = wlt_values-atflv.
ENDIF.
APPEND zr_baseline.
ENDIF.
ENDFORM. "rech_baseline_art_tete
2007 Jul 18 5:46 PM
How did u define zr_baseline. Can you paste that declaration here?
2007 Jul 18 5:58 PM
There is no other declaration than what I already pasted.
In the perform call, we will input the variable wr_baseline that is range of atflv.
RANGES wr_baseline FOR ibvalue0-atflv.
..
PERFORM rech_basline_art_tete TABLES wr_baseline
USING w_cuobj
CHANGING w_baseline_existe
w_baseline_config.
Thanks for your help
2007 Jul 18 6:03 PM
Change your FORM statement as below.
FORM rech_baseline_art_tete TABLES zr_baseline <b>STRUCTURE wr_baseline</b>
USING z_cuobj LIKE lips-cuobj
z_t_poste LIKE mara-matnr
CHANGING z_existe
z_baseline_config TYPE atinn.
2007 Jul 18 5:53 PM
correct syntax for first line
FORM U TABLES X STRUCTURE SFLIGHT .
this is just an example
Message was edited by:
Pawan Kesari
2007 Jul 18 5:59 PM
2007 Jul 18 6:11 PM
Put this def in Global declaration
TYPES t_range TYPE RANGE OF atflv .
this is how u will call
DATA wr_baseline TYPE t_range .
PERFORM test USING wr_baseline .
this is how you will define the form
FORM test USING p_baseline TYPE t_range .
DATA wa_line TYPE LINE OF t_range .
LOOP AT p_baseline INTO wa_line .
WRITE wa_line-sign .
ENDLOOP.
ENDFORM.
2007 Jul 18 6:45 PM