shambhavi
7th September 2018, 14:27
I have witten the below code to print delivery scheme of sales contract, when i compile the same am not getting any error but am not able to get data which i wanted to print, i tried to debug the report their i got to know that it is not selecting record from table.

Please suggest anyone.


|******************************************************************************
|* tdsls3404m000 VRC B61O 10 dttt
|* Annexure for Delivery Scheme
|* bsp
|* 05-09-18 [13:39]
|******************************************************************************
|* Rev.No. 2 tdB61O10test 05 Sep 18 bsp
|* report created
|* Rev.No. 3 tdB61O10test 07 Sep 18 bsp
|* 12
|******************************************************************************

|****************************** declaration section ***************************

declaration:
table ttccom000
table ttdsls300
table ttdsls301
table ttdsls304
extern domain tcncmp r.comp
extern domain tccono r.cono
extern domain tcpono r.pono, r.sqnb
extern domain tcqrd3 r.quan
long year, mn, dy, hh, mm, ss
string year1(4)
string mn1(2)
string dy1(2)
string date1(10)
|*********************************************************************************
before.program:
r.comp=get.compnr()

detail.1:
before.layout:
get.cont.details()

functions:

function get.cont.details()
{
select tdsls301.*
from tdsls301
where tdsls301._index1 = {:tdsls301.cono, :tdsls301.pono, :tdsls301.cofc}
as set with 1 rows
selectdo
select tdsls304.*
from tdsls304
where tdsls304._index1 = {:tdsls304.cono, :tdsls304.pono, :tdsls304.cofc, :tdsls304.ddta}
and tdsls304.cono={:tdsls301.cono}
as set with 1 rows
selectdo
r.cono=tdsls304.cono
r.pono=tdsls304.pono
r.sqnb=tdsls304.sqnb
r.quan=tdsls304.qoor
utc.to.date(tdsls304.ddta, year, mn, dy, hh, mm, ss)
year1=str$(year)
mn1=str$(mn)
dy1=str$(dy)
date1=dy1&"/"&strip$(mn1)&"/"&year1
endselect
endselect
}





output of the code attached.

bdittmar
7th September 2018, 20:10
Hello,
are :tdsls301.cono, :tdsls301.pono, :tdsls301.cofc report inputfields from the printsession?
And are the fields (Values) available at layout detail.1 to select the data with these values ?

Try to trace the fields in debug-mode to analyse the input values for selection.

Maybe a admin can move this thread to the right forum ?

Regards

shambhavi
8th September 2018, 06:51
Hi, i have taken report input fields as r.cono, r.pono.. by passing value tdsls304.cono, tdsls304.pono...
when i debug am not getting value in index parameter itself.

bdittmar
8th September 2018, 15:28
Hello,

select tdsls301.*
from tdsls301
where tdsls301._index1 = {:tdsls301.cono, :tdsls301.pono, :tdsls301.cofc}
as set with 1 rows
selectdo

The where clause is with the table fields itself ?

Try something like (if report input delivers the sales contract number):
select tdsls301.*
from tdsls301
where tdsls301._index1 = {:tdsls300.cono} (Maybe its tdsls300.orno ?)

- select all records for order number :tdsls300 in table tdsls301

- as set with 1 rows gives only the the first (One) record !

On weekend i have no LN-System available, out of mind.

Regards

bdittmar
10th September 2018, 17:50
Hello,
why own Report ?

In session tdsls3600m000 ->
print sales reports ->
Report tdsls340101000 print the delivery sheme if exists.

Regards

shambhavi
11th September 2018, 07:34
Thanks will check in tdsls340101000.

shambhavi
11th September 2018, 11:34
Thanks will check in tdsls340101000.