Skip to Content
0
Former Member
Apr 16, 2014 at 04:38 AM

custom IPC java userexit development for freight condition

73 Views

Hi Experts,

As per my requirement, I need to write a custom java userexit for freight condition. I have done all the UserExit development environment setup on my local machine ( as per PricingUserExitManualV105 guide). I have got code written in ECC side (ABAP) for custom pricing routine (mentioned below)

CONSTANTS : lc_s TYPE rsscr_kind VALUE 'S',

lc_eq TYPE char2 VALUE 'EQ',

lc_i TYPE c VALUE 'I'.

*--- Local Declaration

DATA : lt_tvarvc TYPE STANDARD TABLE OF tvarvc.

*--- Field symbols

FIELD-SYMBOLS : <lfs_tvarvc> TYPE tvarvc,

<lfs_auart> TYPE edm_auart_range.

SELECT * FROM tvarvc INTO TABLE lt_tvarvc

WHERE name = 'ZZSD_ZA00_HDR_MAT'

AND type = lc_s.

*BREAK cbade.

sy-subrc = 4.

if komp-kposn ne 0.

check: komp-prsfd ca 'BX'.

check: komp-kznep = space.

endif.

IF lt_tvarvc[] is NOT INITIAL.

UNASSIGN <lfs_tvarvc>.

READ TABLE lt_tvarvc ASSIGNING <lfs_tvarvc> with KEY LOW = KOMP-MATNR.

IF ( <lfs_tvarvc> is ASSIGNED ) AND ( KOMT1-KSCHL = 'ZA00' ).

sy-subrc = 4.

ELSE.

sy-subrc = 0.

ENDIF.

else.

sy-subrc = 0.

ENDIF.

I am using RequirementAdapter class for this userexit. Would it be OK as per requirement ?

.

Question 1 ) Do i need to define/declare "constants" and "feild-symbols" in Java userexit, as mention in above ABAP code ?

Question2 ) How to write SELECT statement code in Java UserExit ?

Question 3) What would be equivalent code/logic in Java userexit for READ TABLE statement ?

Please do help me with your suggestions/expertise.

Thanks in advance 😊