Search
Search

# PLD Freight in Repetative Area

Hi Experts,

I have 20 items in A/R Invoice, and have 1 Freight amount say at 1500/-

I am trying to give detail in the A/R Invoice PLD, for this I added one more Repetative Area, but the Freigt details are appearing 21 times (as many times the number of items there are in the invoice).

How can I make the detail appear only once in the another repetative area.

Is there any way to group the freight field, and prevent it from appearing more than 1 number of times

Regards,

Murtaza R.E.

##### Gagan Tharejareplied

Hi,

Could you please try out the following:

1. Create UDFs on Marketing Document header level - number of UDF

depending on the max number of Additional Expenses from the OEXD

2. Use query like below for UDF1:

SELECT T2.EXPNSNAME + ' ' + STR(T1.LINETOTAL) + ' ' +

STR(T1.VATSUM) + ' ' + STR(T1.VATPRCNT)

+ ' ' + STR(T1.LINEVAT)

FROM OINV T0

INNER JOIN INV3 T1

ON T0.DOCENTRY = T1.DOCENTRY

INNER JOIN OEXD T2

ON T1.EXPNSCODE = T2.EXPNSCODE

WHERE T0.DOCNUM = \$[OINV.DocNum]

AND T1.LINENUM = 0

Use query like below for UDF2:

SELECT T2.EXPNSNAME + ' ' + STR(T1.LINETOTAL) + ' ' +

STR(T1.VATSUM) + ' ' + STR(T1.VATPRCNT)

+ ' ' + STR(T1.LINEVAT)

FROM OINV T0

INNER JOIN INV3 T1

ON T0.DOCENTRY = T1.DOCENTRY

INNER JOIN OEXD T2

ON T1.EXPNSCODE = T2.EXPNSCODE

WHERE T0.DOCNUM = \$[OINV.DocNum]

AND T1.LINENUM = 1

and so on.

3. Add the UDF to the Layout.

NOTE: The line number is important as there can be more than

one additional expense for the same Document Number;

Note that the query draws the details of one single record per

from the Add Expenses Table. You can make the amendments in the

query as required by either removing or adding more fields;

like increase space between the fields etc

Hope this will help.

Regards,

Gagan Thareja

SAP Business One Forums Team

0 View this answer in context
View more on this topic or