cancel
Showing results for 
Search instead for 
Did you mean: 

Not Allowed to Add Document

former_member593234
Participant
0 Kudos

Hi All,

How its possible to mandatory While adding document without mention this fields. I have two issues.

1. Item group - Toner & cartridge

Without mention Tracker ID for these Item group in AR Invoice & Delivery Cant Possible to Add.

2. Item No - FBT04168, FBT04169, FBT04171, FBT04170

Without mention Tracker ID for this item No.in AR Invoice can't possible to add

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member593234
Participant
0 Kudos

Hi,

I need to some updation's in above, So please provide below details.

Please find the attachment. dathulworkssap-community14-3-195.jpg

1. I want to block while adding two item groups in Delivery & Invoice , nd 4 item Numbers in Invoice without mention 'Tracker ID'.

Item Group Code - 188 & 110

Item Number - FBT04168, FBT04169, FBT04171, FBT04170

2. Please give me different query's

former_member312729
Active Contributor
0 Kudos

Hi Atul,

As you mentioned for that particular item group and itemcode if the document missing tracking no it will prevent from adding and for the other group and item belonging to other group will allow to add without tracking number.

The below gives this message when condition is true.

Begin

SET@error =101

SET@error_message =N'Tracker No is missing'

Regards:

Balaji.S

former_member593234
Participant
former_member312729
Active Contributor
0 Kudos

Hi,

Not working means, did you tried to add AR invoice with different group item not belonging to Item group code mentioned .

As per the screen shot of yours change the object type to '15' and try to add delivery document.

Regards:

Balaji.S

former_member593234
Participant
0 Kudos

Now I can possible to add document without mention tracking no. How its ??

Below is the first one for delivery these item groups. Its showing successfully in SQL Server.

if @object_type = '15' and @transaction_type in (N'A', N'U')
begin
if exists (select * from DLN1 a
inner join ODLN b on a.DocEntry = b.DocEntry
inner join oitm c on a.ItemCode = c.ItemCode
inner join OITB d on c.ItmsGrpCod = d.ItmsGrpCod
where a.DocEntry = @list_of_cols_val_tab_del
and ( c.ItmsGrpCod in('188','110'))and Isnull(b.TrackNo,'')='')
Begin SET @error = 110 SET @error_message = N'Tracker No is missing'
End
End

former_member312729
Active Contributor
0 Kudos

Hi ,

When condition is true for below then will block. As item belonging to this group and track no is null then it will block the document while adding. If the item belong to other group then without track no it will allow add the document

( c.ItmsGrpCod in('188','110'))and Isnull(b.TrackNo,'')=''

Regards:

Balaji.S

former_member593234
Participant
former_member312729
Active Contributor
0 Kudos

Hi Atul,

Take some initiative to check on the commands. When you copy paste and trying to alter as per your requirement

In the image Closing Bracket missing

Regards:

Balaji.S

former_member593234
Participant
0 Kudos

I tried with correct query, then created 188 & 110 group items delivery & AR Invoice...still it can be possible to add without tracking no.

former_member312729
Active Contributor
0 Kudos

Hi Atul,

From morning i am repeating same

Object type =13 for AR invoice

Object type =15 delivery .

Based on the above value that particular screen will be not allow to add.

You try for one of the document with the correct object type

former_member312729
Active Contributor
0 Kudos

Hi Atul,

Right click on the dbo.SBO_SP_TransactionNotifiation select modify option and paste it below for reference.

former_member593234
Participant
0 Kudos

Done with this information, but its possible to add AR Invoice without mention Tacking No. No error msg showing

In this below Query (101 - Stands for) What ????

BeginSET@error =101SET@error_message =N'Tracker No is missing'

former_member312729
Active Contributor
0 Kudos

Hi Athul,

Copy paste to the TransactionNotification of the database you required and execute

former_member593234
Participant
0 Kudos

I am first time doing this, trying to test data base, can you help me how its copy paste...I dnt get it actually. dathulworkssap-community14-3-192.jpg

former_member593234
Participant
0 Kudos
former_member312729
Active Contributor
0 Kudos

Hi Try the below SP

Below is for the Invoice and you can remove the Item code condition for delivery, also change the item group code as per your system

if @object_type = '13' and @transaction_type in (N'A', N'U')
begin
if exists (select * from inv1 a
          inner join oinv b on a.DocEntry = b.DocEntry
          inner join oitm c on a.ItemCode = c.ItemCode
          inner join OITB d on c.ItmsGrpCod = d.ItmsGrpCod
        where a.DocEntry = @list_of_cols_val_tab_del 
		and ( c.ItmsGrpCod in('100','101') or c.ItemCode in('FBT04168', 'FBT04169', 'FBT04171', 'FBT04170')) 
and Isnull(b.TrackNo,'')='')
Begin SET @error = 101 SET @error_message = N'Tracker No is missing'
End
End

Regards:

Balaji.S

former_member593234
Participant
0 Kudos

Hi Balaji Selvaraj ,

It's not working in query generator. Getting errors, it's done through Query generator or SQL ???

former_member312729
Active Contributor
0 Kudos

Hi ,

You mentioned to prevent document from adding . This is to be run in SQL. Under transaction notification.

Regards:

Balaji.S