cancel
Showing results for 
Search instead for 
Did you mean: 

BSW% is not considered for correcting the transactional quantity

Former Member
0 Kudos
221

I solicit a little help from the Group. We have a Crude Vendor which is also in SAP platform . They have implemeted TSW and now Crude delivery tickets are generated from System.

On scrutinty of ticket It is observed taht BS&W percentage is not considered while calulating quantities in Transaction UOM.

Transaction code : O3QCITEST.

Conv. Group = ZCDR.=53&54A 15 °C CRUDE OIL

UoM Group = CRD.=L/L15/KG/BB6

Transaction Quantity = 100 L.

Material temp = 30 deg-C

Test temp = 15 Deg-C

Test relative density = 870 KGV.

With the above data if you put BSW% = 0, then additional quantities calculated are 0.622 BB6, 85.938 KG, 98.779 L15 , 100 L.

if you put BSW% = 0.5, then additional quantities are 0.618 BB6, 85.508

KG, 98.285 L15 , 100 L.

From above it is clear that the additional quantities in all units except in "L" change whenever the BSW% changes. This shows that BSW% is not considered in calculating the "L" quantity.

In actual practice BSW correction should happen for Transactional Quantity also.

If you have any solution for the above scenarion . please suggest.for necessary correction.

regards

Dipak

dipakbora@gmail.com

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Vishnu

You r right . Standard SAP behaves that way only. We modified badi OIB_QCI_ROUND_QTY

method: IF_EX_OIB_QCI_ROUND_QTY~ROUND_QTY

coding atatched.

Anyway thanks for reply.

METHOD IF_EX_OIB_QCI_ROUND_QTY~ROUND_QTY .

  • Local Data

TYPES: T_CTPARAM TYPE OIB_A10,

T_ADQNT TYPE OIB_A05.

DATA: S_CTPARAM TYPE OIB_A10,

S_ADQNT TYPE OIB_A05,

S_ADQNTN TYPE OIB_A05.

DATA : L_BSW(72) TYPE C.

DATA: W_PAR_FLTP TYPE OIB_A10-PAR_FLTP,

WF_BSW TYPE OIB_A10-PAR_FLTP .

DATA: IT_PARAM TYPE STANDARD TABLE OF T_CTPARAM,

IT_ADQNT TYPE STANDARD TABLE OF T_ADQNT,

IT_ADQNTN TYPE STANDARD TABLE OF T_ADQNT.

DATA: W_TABIX TYPE SY-TABIX.

DATA: W_DIMENSION TYPE T006-DIMID,

W_TEXT TYPE T006T-TXDIM,

W_MEINS TYPE T006-MSEHI ,

L_MENGE TYPE MLEA-MEINH ,

WA_PARAM TYPE OIB_A10 .

*-----DATA DECLARATION FOR L15 START -


DATA : WF_ADQNT_L TYPE OIB_A05-ADQNT,

WF_ADQNT_L15 TYPE OIB_A05-ADQNT,

WF_ADQNT_TMP TYPE OIB_A05-ADQNT,

WF_ADQNT_ROUND TYPE OIB_A05-ADQNT,

WF_ADQNT_KG TYPE OIB_A05-ADQNT.

*-----DATA DECLARATION FOR L15 END -


IT_ADQNT = TC_QT2TAB.

READ TABLE ITC_PARAM INTO S_CTPARAM WITH KEY FIELDNAME = 'UMRSL'.

IF SY-SUBRC = 0 AND S_CTPARAM-PAR_CHAR = 'ZCRD' . "’ . "AMP

READ TABLE ITC_PARAM INTO S_CTPARAM WITH KEY FIELDNAME = 'MEINH'.

W_MEINS = S_CTPARAM-PAR_CHAR.

IF W_MEINS NE SPACE.

CALL FUNCTION 'DIMENSION_GET_FOR_UNIT'

EXPORTING

LANGUAGE = SY-LANGU

UNIT = W_MEINS

IMPORTING

DIMENSION = W_DIMENSION

TEXT = W_TEXT

EXCEPTIONS

UNIT_NOT_FOUND = 1

OTHERS = 2.

ENDIF.

IF W_DIMENSION = 'VOLUME'.

READ TABLE ITC_PARAM INTO S_CTPARAM

WITH KEY FIELDNAME = 'BSWCN'.

WF_BSW = S_CTPARAM-PAR_FLTP .

READ TABLE IT_ADQNT INTO S_ADQNT WITH KEY MSEHI = 'MT' MANEN = ' '.

IF SY-SUBRC = 0.

W_TABIX = SY-TABIX.

S_ADQNT-ADQNT =

S_ADQNT-ADQNT * ( 1 - ( S_CTPARAM-PAR_FLTP / 100 ) ).

MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT.

TC_QT2TAB = IT_ADQNT.

ENDIF.

READ TABLE IT_ADQNT INTO S_ADQNT WITH KEY MSEHI = 'KG' MANEN = ' '.

IF SY-SUBRC = 0.

W_TABIX = SY-TABIX.

S_ADQNT-ADQNT =

S_ADQNT-ADQNT * ( 1 - ( S_CTPARAM-PAR_FLTP / 100 ) ).

MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT.

TC_QT2TAB = IT_ADQNT.

ENDIF.

*-----Start BSW% in Litre Qty----

READ TABLE IT_ADQNT INTO S_ADQNT WITH KEY MSEHI = 'L' MANEN = ' '.

IF SY-SUBRC = 0.

W_TABIX = SY-TABIX.

S_ADQNT-ADQNT =

S_ADQNT-ADQNT * ( 1 - ( S_CTPARAM-PAR_FLTP / 100 ) ).

WF_ADQNT_L = S_ADQNT-ADQNT .

MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT.

TC_QT2TAB = IT_ADQNT.

ENDIF.

*-----End BSW% in Litre Qty--


*---L15 start----

READ TABLE IT_ADQNT INTO S_ADQNT WITH KEY MSEHI = 'L15' MANEN = ' '.

IF SY-SUBRC = 0.

W_TABIX = SY-TABIX.

WF_ADQNT_L15 = S_ADQNT-ADQNT .

WF_ADQNT_TMP = ( WF_ADQNT_L15 / WF_ADQNT_L ).

CALL FUNCTION 'ROUND'

EXPORTING

DECIMALS = 4

INPUT = WF_ADQNT_TMP

SIGN = 'X'

IMPORTING

OUTPUT = WF_ADQNT_ROUND

EXCEPTIONS

INPUT_INVALID = 1

OVERFLOW = 2

TYPE_INVALID = 3

OTHERS = 4.

WF_ADQNT_L15 = WF_ADQNT_ROUND * WF_ADQNT_L .

S_ADQNT-ADQNT = WF_ADQNT_L15 .

  • MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT. " ---Blocked by Prasanta on 08-june-07

MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT.

TC_QT2TAB = IT_ADQNT.

ENDIF.

*---L15 end----

*---KG start---

READ TABLE IT_ADQNT INTO S_ADQNT WITH KEY MSEHI = 'KG' MANEN = ' '.

IF SY-SUBRC = 0.

W_TABIX = SY-TABIX.

READ TABLE ITC_PARAM INTO S_CTPARAM

WITH KEY FIELDNAME = 'BDICH'.

WF_ADQNT_KG = ( WF_ADQNT_L15 / ( 1 - ( WF_BSW / 100 ) ) * ( ( S_CTPARAM-PAR_FLTP / 1000 ) - 11 / 10000 ) ) - ( WF_ADQNT_L15 / ( 1 - ( WF_BSW / 100 ) ) * ( WF_BSW / 100 ) * 9979 / 10000 ) .

S_ADQNT-ADQNT = WF_ADQNT_KG .

MODIFY IT_ADQNT FROM S_ADQNT INDEX W_TABIX TRANSPORTING ADQNT.

TC_QT2TAB = IT_ADQNT.

ENDIF.

*---KG end---

ENDIF.

ENDIF.

ENDMETHOD.

Former Member
0 Kudos

Hi Dipak,

I am not sure if i have understood your question right.

As far as the transaction quantity is considered, this should be something which you have a means for measurement and whatever you enter here is considered as the final quantity. The transaction quantity would never be changed irrespective of the values in any of the QCI parameters.

Do let me know if you have any further questions.

Best Regards

Vishnu