Skip to Content
2
Former Member
Jul 18, 2007 at 04:42 PM

Very Urgent question on ranges

20 Views

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