cancel
Showing results for 
Search instead for 
Did you mean: 

SDOC transfer using CS_ITM_CDOC-CVL is not working

Former Member
0 Kudos

Help! we have used /SAPSLL/IF_EX_IFEX_SD0C_R3~IF_EXTEND_CUS_CDOC to transfer pricing conditions from ECC to GTS.

On the GTS side, we have ensured that there is mapping of conditions from Feeder system set up. We have verified this.

The code in BADI is ...

We have a table in ECC, with ECC price condition and corresponding GTS price condition (table below shown as GT_PRIC_COND_MAPPING)

GV_POSNN = LS_ITEM_GEN-ITEM_NUMBER.

   
LOOP AT IT_KOMV ASSIGNING <LS_KOMV>

           
WHERE KPOSN = GV_POSNN.

     
READ TABLE GT_PRIC_COND_MAPPING ASSIGNING <GS_PRIC_COND_MAPPING>

                
WITH KEY ZKEY3 = <LS_KOMV>-KSCHL.

     
IF SY-SUBRC EQ 0.

       
CLEAR LS_CVL.

        LS_CVL
-ITEM_NUMBER  = LS_ITEM_GEN-ITEM_NUMBER.

        LS_CVL
-QUAL_VAL     = <GS_PRIC_COND_MAPPING>-ZVAL.

        LS_CVL
-VALUE        = <LS_KOMV>-KWERT.

        LS_CVL
-VALUE_FLOAT  = <LS_KOMV>-KWERT.

        LS_CVL
-VAL_CURR     = IS_VBRK-WAERK.

        LS_CVL
-VAL_CURR_ISO = IS_VBRK-WAERK.

        LS_CVL
-CVRTQ        = IS_VBRK-KURRF.

       
APPEND LS_CVL TO CS_ITM_CDOC-CVL.

     
ENDIF.



   
ENDLOOP.

The structer for CS_ITM_CDOC-CVL in the BADI seems to look right. has all the value we want to transfer to GTS.

However, this data does not go to GTS. Do we need a commit statement?

Any pointer will be very much appreciated.


Thanks,

Padma


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am not an ABAP expert but I do see the code one of developers wrote has "COMMIT and WAIT"

former_member215181
Active Contributor
0 Kudos

Hi Padma,

The value qualifiers for transfer to Export Declarations are fixed in the GTS code (and working automatically without any BAdI code).  You cannot add extra qualifier values and expect them to be transferred.  The mapping of Condition Types to GTS Duty Types is provided for the transfer of Purchase Orders (Application MM0A).

It's not usually necessary to transfer any values other than Net Value and Statistical Value for Export Declarations.  Perhaps you could explain what you are trying to achieve?

Regards,

Dave

Former Member
0 Kudos

Dave,

Thanks for your quick response.  Here is what we are trying to achieve.

On the ECC Side we have GRWR value (statistical value) - but we have transport charges included in this. So, we want to map GRWR from ECC to GTS  - say ZGWR condition type, then we have calculation in GTS, take a percentage off this value to derive at true W001 - value for customs.

Normally the Statiscal Value from ECC goes to W001 in GTS. we do not want this, we want to map this to go to ZGWR, then we have a val.BADI in GTS, that takes a percentage off this ZGWR and derives W001.  Hope I am making sense.

Perhaps we need to define a AP structure  in the code - note there is /SAPSLL/API6800_ITM_VAL_MASS_S  in GTS that contains duty rates.  Perhaps in ECC BADI we need to define this structure???  Not sure how this transfer occurs.

Thanks,
Padma

Former Member
0 Kudos

Hi Dave

I do see customers asking for transfer of Inland freight to GTS, in addition to the statistical value and net value.

Also, some customers print commercial invoice from GTS for their customer's import purposes and the value has to in foreign currency. Statistical value passed from ECC to GTS is ONLY in USD. I am not sure how to pass foreign currency value  in a non-valuated intra-company transfers.

former_member215181
Active Contributor
0 Kudos

Hi Padma,

The standard code finds and populates the first Duty Type with VALTY = '003'.  That doesn't have to be Duty Type 'W001' - you could easily configure another to receive the Statistical Value that you transfer.

BUT...

My previous answer was wrong, and I'm sorry about that.  After checking the code, I now realise that you CAN transfer individual conditions using the _CVL item-level table, so your technique should work.  Be sure that your mapping from Condition Type to GTS Duty Type is in either table /SAPSLL/TLCAVS or /SAPSLL/TLCAGS (Logical System or Group of Logical Systems).

Looking at your code, I think you should take a little more care with the ISO value of  the currency.  And if you have problems, it might be best not to transfer the Exchange Rate at first, in case that is giving problems.

Hope that helps.

Regards,

Dave

Former Member
0 Kudos

Dave,

Thanks for the pointers. Actually, we were finally able to make this work. One important lesson learned, the pricing condition in GTS should be mapped in GTS in table /SAPSLL/TLCAGS  - the screen is a bit misleading. When you see the screen, it appears as if we need to enter the feeder system condition type, but really needs to be GTS pricing condition.

Once we've tested this, I will make a post for those that might have issues with technique to pass pricing conditions from ECC to GTS.

Thanks,

Padma