Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom table is getting populated with blank entry in Enhancement

Former Member
0 Kudos
287

Hi All,

In GTS system We have done enhancement implementation in the include /SAPSLL/LLEGCON_IFACEI01 to create an entry into custom table with the values sales order number, sales order item number, country of origin etc...

We have used Modify statement for creating entry, we have even done enque and dequeue before and after Modify statement.

I have written to check whether the field has entry or not before getting into the modify statement.

In some cases intermittantly getting blank entry created into the custom table.

Could you please suggest what could be the reason behind.

I am thinking user might have stopped the session while execution of the transaction.

Thanks and regards,

Srinivas.

8 REPLIES 8

arivazhagan_sivasamy
Active Contributor
0 Kudos
210

Hi Sri,

In this case you can write a code in call function <fmname> in Update task.

Since, It will work when standard commit is executed.

Arivazhagan S.

nabheetscn
Active Contributor
0 Kudos
210

Hi Sri

Can you please share your code where blank value check you have put in?

Nabheet

0 Kudos
210

Hi Nabheet,

Below is the code snippet.

 

IF  v_refno IS NOT INITIAL AND p_sales_item IS NOT INITIAL.

----------

----------

Some validation coding is done here for other fields, those are not relevant for  our case now

-----

 

IF v_error_flag IS INITIAL.
v_date
= sy-datum.
v_time
= sy-uzeit.

CONCATENATE v_date v_time INTO v_timestamp.

l_wa_zslo_gts_edd1085
-mandt = sy-mandt. "Client
l_wa_zslo_gts_edd1085
-refno = v_refno. "Sales Order
l_wa_zslo_gts_edd1085
-itvsy = p_sales_item. "Sales Item
l_wa_zslo_gts_edd1085
-eccn = p_eccn. "ECCN
l_wa_zslo_gts_edd1085
-ctyor = p_co.

"Country of Origin

Here Enqueue FM is called for table.

Modify statement is written for custom table

Here if SY-SUBRC is zero then commit work written

else

roll back work

Here Dequeue FM is written

ENDIF.

ENDIF.

Thanks,

Srinivas

0 Kudos
210

Hi Sri,

As Arivazhagan suggested, have you tried with putting this code in FM with update task??

Thanks

Deependra

0 Kudos
210

Hi Sri

Do one thing just do a where used list on this table and see if some other program might be the culprit.

What does where used list of table shows..?

Nabheet

0 Kudos
210

Hi Nabheet,

I have already checked where used list, but found this is the only place the table is used for creating entries.

Srinivas.

0 Kudos
210

Hi Deependra,

I can do the way that Arivazhagan suggested, but we can not make sure that the issue is resolved as this is not happenning regularly and even it happennin in production very rarely.

So I just wanted to check what could be the reson for that and what action can resolve the issue.

Thank you all for your suggestions.

Srinivas.

0 Kudos
210

Hi Srini,

As you are saying issue happens  rarely.May be that could be due to memory or LUW in live system.

so best practice says whenever you add data in custom table through enhancement, Need to sure all database updation done by update task.That is my personal opinion.

Thanks

Deependra