Skip to Content
0
Former Member
Jun 28, 2007 at 09:06 AM

BAPI_REQUIREMENTS_CREATE Problem

93 Views

Hi,

When i execute this code(below), I am getting an error called "Argument does not exist in the table"?

can any one say, what would be the problem.

Vijayanand

**********************************************************************************************

LOOP AT GT_FLAT INTO GX_FLAT.

GV_INDEX = SY-TABIX + 1.

ON CHANGE OF GX_FLAT-MATNR.

*-----POPULATING THE ITEM INFORMATION

MATNR_N = GX_FLAT-MATNR.

GX_ITEMS-MATERIAL = MATNR_N.

SELECT SINGLE WERKS FROM MARC

INTO WERKS

WHERE MATNR = GX_ITEMS-MATERIAL.

GX_ITEMS-PLANT = WERKS.

GX_ITEMS-REQU_TYPE = '001'.

GX_ITEMS-VERSION = 'GP'.

ENDON.

GT_SCHEDULE-DATE_TYPE = '3'.

GT_SCHEDULE-REQ_DATE = GX_FLAT-EDATU.

GT_SCHEDULE-REQ_QTY = GX_FLAT-PLNMG.

APPEND GT_SCHEDULE.

CLEAR: GT_SCHEDULE.

LOOP AT GT_FLAT TRANSPORTING NO FIELDS FROM GV_INDEX WHERE MATNR = GX_FLAT-MATNR.

ENDLOOP.

IF SY-SUBRC <> 0.

CALL FUNCTION 'BAPI_REQUIREMENTS_CREATE'

EXPORTING

REQUIREMENTS_ITEM = GX_ITEMS

  • REQUIREMENT_PARAM =

  • DO_COMMIT = 'X'

  • UPDATE_MODE = 'X'

  • REFER_TYPE = ' '

  • PROFILID = ' '

  • IMPORTING

  • MATERIAL =

  • PLANT =

  • REQUIREMENTSTYPE =

  • VERSION =

  • REQMTSPLANNUMBER =

  • MRP_AREA =

  • MATERIAL_EVG =

TABLES

REQUIREMENTS_SCHEDULE_IN = GT_SCHEDULE

  • REQUIREMENTS_CHAR_IN =

RETURN = GT_RETURN.

LOOP AT GT_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.

ENDLOOP.

IF SY-SUBRC <> 0 AND GT_RETURN IS INITIAL.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ELSEIF SY-SUBRC = 0.

LOOP AT GT_RETURN.

WRITE:/ GT_RETURN-MESSAGE.

ENDLOOP.

ENDIF.

REFRESH GT_SCHEDULE.

ENDIF.

ENDLOOP.