Skip to Content
0
Former Member
May 26, 2009 at 06:22 AM

Co88 issue:Runtime error

247 Views

Hi experts,

While i run CO88,i found following error:

Runtime Errors RAISE_EXCEPTION

Date and Time 26.05.2009 11:16:42

ShrtText

Exception condition "AUFNR_NOT_FOUND" raised.

What happened?

The current ABAP/4 program encountered an unexpected

situation.

Error analysis

A RAISE statement in the program "SAPLCOSE" raised the exception

condition "AUFNR_NOT_FOUND".

Since the exception was not intercepted by a superior program

in the hierarchy, processing was terminated.

Short description of exception condition:

Order not in buffered AFPO table

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

Trigger Location of Runtime Error

Program SAPLCOSE

Include LCOSEU03

Row 44

Module type (FUNCTION)

Module Name CO_AFPO_BWTAR_GET

Source Code Extract

Line SourceCde

14 *" VALUE(LEAD_AUFNR_HAS_COPRODUCTS_EXP)

15 *" LIKE DATATYPE-CHAR0001

16 *" VALUE(SRULE_GENERATE_EXP) LIKE DATATYPE-CHAR0001

17 *" EXCEPTIONS

18 *" AUFNR_NOT_FOUND

19 *"----


20

21 FIELD-SYMBOLS:

22 <LD_AFPO> LIKE AFPO.

23

24 DATA:

25 LD_TABIX LIKE SY-TABIX,

26 LD_AUFK LIKE AUFK,

27 LD_AFKO LIKE AFKO,

28 LD_AFPO LIKE AFPO.

29

30 * If no order position, assume 1st position

31 IF POSNR_IMP IS INITIAL.

32 POSNR_IMP = CON_POSNR_0001.

33 ENDIF.

34

35 CALL FUNCTION 'K_AFPO_READ'

36 EXPORTING

37 I_AUFNR = AUFNR_IMP

38 I_POSNR = POSNR_IMP

39 IMPORTING

40 E_AFPO = LD_AFPO

41 EXCEPTIONS

42 NOT_FOUND = 1.

43 IF NOT SY-SUBRC IS INITIAL.

>> RAISE AUFNR_NOT_FOUND.

45 ENDIF.

46

47 * Collective orders only exist for order type 10 and 40

48 IF LD_AFPO-DAUTY = '10' "PP-FA

49 OR LD_AFPO-DAUTY = '40'. "PP-PI

50 CALL FUNCTION 'K_AFKO_READ'

51 EXPORTING

52 I_AUFNR = AUFNR_IMP

53 IMPORTING

54 E_AFKO = LD_AFKO

55 EXCEPTIONS

56 NOT_FOUND = 1.

57 IF SY-SUBRC <> 0.

58 CLEAR LD_AFKO.

59 ENDIF.

60 ENDIF.

61

62 IF LD_AFPO-RTP03 = 'X' AND LD_AFPO-KZBWS = 'M'.

63 SRULE_GENERATE_EXP = 'X'.

Please advise.

Regards,

Samar