cancel
Showing results for 
Search instead for 
Did you mean: 

Document series match with tax code transaction notification SAP Business One

nikunjmehta2290
Participant
0 Kudos

Hello all,

Tax code comes in OINV as per document series selection. Please do the needful here.

Tax code : IGST5 then series comes LC20 like. not allow to add document in other series.

Version : SBO 10.0 HANA

Regards,

Nikunj

Accepted Solutions (0)

Answers (1)

Answers (1)

hdolenec
Contributor
0 Kudos

How do you define which tax code can be used for which document series? Where is this information in the system, which table and field? Exact stored procedure depends on that.

nikunjmehta2290
Participant
0 Kudos

For AR Invoice only, I need this things. There are 3 tax code in SBO and document series are 10 but I want only 1 tax code to allow to select 3 series not all 10.

hdolenec
Contributor
0 Kudos

Ok, but my question was how do you determine which tax code can be used for which document series? Lets say you have an UDF on document series U_TaxCode in NNM1 table, and you use this UDF to determine series tax code. SP would be something like:

IF :object_type = N'13' AND :transaction_type = N'A' THEN
               SELECT IFNULL(COUNT(*),0) INTO control_cnt
   FROM OINV T0
   INNER JOIN INV1 T1 ON T0."DocEntry" = T1."DocEntry" 
   INNER JOIN NNM1 T2 ON T0."Series" = T2."Series"
   WHERE T0."DocEntry"= :list_of_cols_val_tab_del 
   AND T1."VatGroup != IFNULL(T2."U_TaxCode", '');
   if :control_cnt > 0 THEN
               begin
               error := 1;
               error_message := N'Wrong tax code for selected series';
               end;
   end if;
end if;



nikunjmehta2290
Participant
0 Kudos

Thank for your support. But there is no UDF comes in between here.

For e.g. I have 3 document series AB, LC, DC in SBO HANA version.

When user is select IGST5 tax code in AP credit memo then only allow to AB series not allow to punch transaction in other series. If user have selected LC series agings IGST5 then error comes.

Regards,

Nikunj

hdolenec
Contributor
0 Kudos

That is what I am asking - how do you define that tax code IGST5 can only be used on AB series? Is that information written anywhere in B1 database or do you want to have a fixed condition in SP?

If you are using fixed conditions, then you can do following:

IF :object_type = N'13' AND :transaction_type = N'A' THEN
               SELECT IFNULL(COUNT(*),0) INTO control_cnt
   FROM OINV T0
   INNER JOIN INV1 T1 ON T0."DocEntry" = T1."DocEntry" 
   INNER JOIN NNM1 T2 ON T0."Series" = T2."Series"
   WHERE T0."DocEntry"= :list_of_cols_val_tab_del 
   AND T1."VatGroup = 'IGST5'
   AND T2."SeriesName" != 'AB';
   if :control_cnt > 0 THEN
               begin
               error := 1;
               error_message := N'Wrong tax code for selected series';
               end;
   end if;
end if;


<br>