Application Development and Automation 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: 
Read only

How to avoid duplicate entry while printing the smartform

Former Member
0 Likes
2,774

Hi Expert,

In my development i have to duplicate values while printing the smart form.

This is my layout,

My output should be,

Based on the line item it should avoid the duplicate values.But in some case different Bin & Pallet should come under same item no.

In that case o/p should come like below

Eg:

10     1..RAW.........   S1 Raw     A9BOT2     158      8000000136

                                                A9BOT3      159     8000000137

Hi Expert,

In my development i have to duplicate values while printing the smart form.

This is my layout,

My output should be,

Based on the line item it should avoid the duplicate values.But in some case different Bin & Pallet should come under same item no.

In that case o/p should come like below

Eg:

10     1..RAW.........   S1 Raw     A9BOT2     158      8000000136

                                                A9BOT3      159     8000000137

5 REPLIES 5
Read only

Former Member
0 Likes
1,732

Hi,

Capture the value in a variable and check whether the previous value and the current value is same before entering into the text. Put a condition there that if both are different then enter into the text.

So like this it will not print the duplicates.

Read only

Former Member
0 Likes
1,732

Hi Prabu,

In your output internal table define two more fields of type C.

Before line item display node, create a code node and write logic to indentify the duplicate entries and set the flag on every new pattern.

Ex:

LOOP AT itab ASSIGNING <fs_line>.

AT NEW item_no.

     <fs_line>-flag1.

ENDAT.

AT NEW bin.    

     <fs_line>-flag2.

ENDAT.

ENDLOOP.

While printing the output internal table rows just check these flags to control the duplicate values.

Regards

Praveen

Read only

Former Member
0 Likes
1,732

Hi ,

Try to sort out you internal table based on primary key or secondary key or based on a field which you want and then use DELETE ADJACENT  for same internal table.

Read only

Former Member
0 Likes
1,732

HI,

Use can use delete adjacent dublicates from (Internal Table)

Read only

Former Member
0 Likes
1,732

Hi,

Use table events in smartform then you will get required output.