Skip to Content
0
Former Member
Nov 29, 2005 at 03:48 PM

plz help me out bapi message (urgent)

110 Views

hi

i need help. i m passing values in bapi n taking message from table in bapi to print in out put.

requirment is..

a) Pass the following parameters:

NUMBER = NETWORK

Tables: I_COMPONENTS_CHANGE

COMPONENT = IT_COMP-COMPONENT

BATCH = P_CHARG

Tables: I_COMPONENTS_CHANGE_UPDATE

COMPONENT = IT_COMP-COMPONENT

BATCH = “X”

b) The components that failed update are provided in table, E_MESSAGE_TABLE. If MESSAGE_TYPE = “E”, get EXTERNAL_OBJECT_ID and MESSAGE_TEXT. Remove spaces from EXTERNAL_OBJECT_ID and then match against IT_COMP-COMPONENT to get MATERIAL, PLANT and NETWORK and write MATERIAL, PLANT and NETWORK and MESSAGE_TEXT to the job log.

so for that i m doing coding like (this is part of my program)

LOOP AT i_temp_comp.

CLEAR : i_comp_change,i_comp_upd,i_e_msg.

REFRESH : i_comp_change,i_comp_upd,i_e_msg.

LOOP AT i_comp WHERE network = i_temp_comp-network.

l_number = i_comp-network.

i_comp_change-component = i_comp-component.

i_comp_change-batch = p_charg.

APPEND i_comp_change.

i_comp_upd-component = i_comp-component.

i_comp_upd-batch = c_x.

APPEND i_comp_upd.

ENDLOOP.

CALL FUNCTION 'BAPI_NETWORK_COMP_CHANGE'

EXPORTING

number = l_number

TABLES

i_components_change = i_comp_change

i_components_change_update = i_comp_upd

e_message_table = i_e_msg.

IF NOT i_e_msg[] IS INITIAL.

LOOP AT i_e_msg.

IF i_e_msg-message_type = c_e.

READ TABLE i_comp WITH KEY network = l_number

component = i_e_msg-external_object_id. "#EC *

IF sy-subrc IS INITIAL.

i_output-material = i_comp-material.

i_output-plant = i_comp-plant.

i_output-network = i_comp-network.

i_output-message = i_e_msg-message_text.

APPEND i_output.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDLOOP.

problem is it is not showing message in i_output.

so no data is printing.

plz help me out