on 12-08-2020 8:30 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
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
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>
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.