Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 14th August 2018, 07:23
shambhavi shambhavi is offline
Junior Member
 
Join Date: May 2018
Posts: 18
shambhavi is on a distinguished road
Baan: LN 10.4 - DB: SQL - OS: Linux
Unable to print Item serial no in custom invoice report

Code:
 |******************************************************************************
|* cisli44350100p   VRC B61O 10 dttt
|* Pragati Customs Invoice
|* kiranbab
|* 08-08-18 [15:28]
|******************************************************************************
|*	Rev.No. 3  ciB61O10test  08 Aug 18 kiranbab
|*  ...
|******************************************************************************

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

declaration:
	
	table	ttccom000
	table	ttccom130
	table	ttccom100
	table	ttdsls400	
	table	ttcmcs013
	table	ttcibd006
	table	ttcibd943
	table	twhinh431
	table	ttdsls401
	table	twhinh433
	table	ttcibd401
	table	ttimfc011

	extern	domain	tcmcs.str100	ln1, ln2, ln3, ln4, ln5, ln6, r.nama
	extern	domain	tcncmp		r.comp		
	extern	domain	tcrefb		cont.name
	extern	domain	tccom.bpid	r.pre.carrier
	extern	domain	tcmcs.str30	r.plc.rec, r.cont.org
	extern	domain	tcccty		r.cont.fd
	extern	domain	tccom.cadr	r.prt.ld, r.prt.ds
	extern	domain	tcdsca	r.dsca
	extern	domain	tccitt	r.citt
	extern	domain	tcscod.l r.hsn
	extern	domain tcpono r.pos, r.itml, r.sqnc
	extern	domain tcitem r.item
	extern	domain tcdsca	r.idsca
	extern	domain	tcqiv1 r.qua
	extern	domain	tccuni	r.qun
	extern	domain	tcamnt	r.amnt, r.lamnt, r.total
	extern	domain	tcaitm	r.citm
	extern	domain	tcmcs.str70  v.serl
	extern	domain	tcmcs.st30m r.corn
	extern	domain	tcscod.l r.hsn
	extern	domain	tccdec r.cdec
	extern	domain	tcmcs.str30	serials(1)		based
	extern	domain	tcmcs.str70	o.serials(1)		based
	domain	tcmcs.long		no.of.serial
	domain	tcmcs.long		pr.serl.cnt, serl.print
	extern domain tcmcs.str70	con.slno,con.slno.new,v.serl
	extern domain tcmcs.s512	r.serial.all

before.program:
r.comp = get.compnr()

header.5:
before.layout:
get.comp.addr()
get.supp.addr()
get.contact.name()

detail.5:
before.layout:
get.order.details()
serl.print=0
get.serial.no()

detail.10:
before.layout:
if serl.print <pr.serl.cnt then
		serl.print = serl.print + 1
		v.serl =o.serials(1,serl.print)
	endif

|	v.serl =o.serials(1, serl.print)

after.layout:
	if serl.print <pr.serl.cnt then
		layout.again()
	endif

functions:

function get.comp.addr()
{
	select	tccom000.*
	from	tccom000
	where	tccom000.ncmp = {:r.comp}
	as set with 1 rows
	selectdo
		select	tccom100.*
		from	tccom100
		where	tccom100.cadr = {:tccom000.cadr}
		selectdo
			r.nama = tccom100.nama
		endselect
			
		select	tccom130.*
		from	tccom130
		where	tccom130.cadr = {:tccom100.cadr}
		selectdo
			ln1 = tccom130.ln01
			ln2 = tccom130.ln02
			ln3 = tccom130.ln03
			ln4 = tccom130.ln04
			ln5 = tccom130.ln05
			ln6 = tccom130.ln06
		endselect
	endselect
}

function get.supp.addr()
{
		select	tccom100.*
		from	tccom100
		where	tccom100.bpid = {:cisli435.itbp}
		selectdo
			bp.nama = tccom100.nama
		endselect

		select	tccom130.*
		from	tccom130
		where	tccom130.cadr = {:tccom100.cadr}
		selectdo
			bp1 = tccom130.ln01
			bp2 = tccom130.ln02
			bp3 = tccom130.ln03
			bp4 = tccom130.ln04
			bp5 = tccom130.ln05
			bp6 = tccom130.ln06
		endselect

}

function get.contact.name()
{
	select	tdsls400.*
	from	tdsls400
	where	tdsls400.orno = {:g.order.number}
	selectdo
		cont.name = tdsls400.refb
		r.pre.carrier = tdsls400.prcb.l
		r.plc.rec = tdsls400.plre.l
		r.cont.org = tdsls400.cuha.l
		r.cont.fd = tdsls400.ctyd.l
		r.prt.ld = tdsls400.ptld.l
		r.prt.ds = tdsls400.ptds.l
	endselect

	select tcmcs013.*
	from tcmcs013
	where tcmcs013.cpay={:tdsls400.cpay}
	selectdo
		r.dsca=tcmcs013.dsca
	endselect
}

function get.order.details()
{
	select whinh431.*
	from whinh431
	where	whinh431.shpm={:g.shipment}
	selectdo
		r.pos=g.position
		r.item=g.item
		r.idsca=g.item.dsca
		r.qua=g.quantity
		r.qun=g.unit
		r.itml=g.position
		get.serial.no()
	endselect
	
	select tdsls401.*
	from tdsls401
	where tdsls401.orno={:tdsls400.orno}
	selectdo
		r.citt=tdsls401.citt
		r.citm=tdsls401.citm
|		r.sqnc=tdsls401.sqnb
		r.corn=tdsls401.corn
		r.hsn=tdsls401.hcod.l
		r.cdec=tdsls401.cdec
		r.amnt=g.amount
		r.lamnt=(r.amnt*r.qua)
		r.total= r.total+r.lamnt
	endselect
}

function get.serial.no()
{
	no.of.serial = 0
	pr.serl.cnt = 0
	long ii, stp
	domain	tcmcs.str70 two.serl
	if r.qua<> 0 then
		alloc.mem(serials, 30, r.qua)
		select	whinh433.*
		from	whinh433
		where	whinh433._index1={:whinh431.shpm, :whinh431.pono}
		and	whinh433.reje = tcyesno.no
		and	whinh433.cser <> ""
		selectdo
			no.of.serial = no.of.serial + 1
			serials(1, no.of.serial) = strip$(whinh433.cser)
		endselect
		stp = 0 
		two.serl = ""
		if no.of.serial <> 0 then
			alloc.mem(o.serials, 70, no.of.serial)
		endif
		
		for ii = 1 to no.of.serial
			stp = stp + 1
			if ii = 1 then
				two.serl = "Serial No." & " " & strip$(serials(1, ii)) & ","
			else
				two.serl =  two.serl & strip$(serials(1, ii)) & ","
			endif
			if stp = 2 then
				pr.serl.cnt = pr.serl.cnt + 1
				stp = 0
				o.serials(1, pr.serl.cnt) = strip$(two.serl)
				two.serl = ""
			endif
		
		endfor
		if not isspace(two.serl) and no.of.serial = 1 then
			o.serials(1, no.of.serial) = strip$(two.serl)
		endif
		
		if not isspace(two.serl) and no.of.serial > 2 then
			pr.serl.cnt = pr.serl.cnt + 1
			o.serials(1, pr.serl.cnt) = strip$(two.serl)
		endif	
	endif

}

Last edited by shambhavi : 14th August 2018 at 07:33. Reason: Forgot to explain issue
Reply With Quote
  #2  
Old 14th August 2018, 13:52
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,110
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Can you give us more details? Which field are you talking about - or what is not appearing on the report. For 4c4 I always make sure declared extern and that the field included on the input fields.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #3  
Old 16th August 2018, 06:46
shambhavi shambhavi is offline
Junior Member
 
Join Date: May 2018
Posts: 18
shambhavi is on a distinguished road
Baan: LN 10.4 - DB: SQL - OS: Linux
In this GST invoice print report i have to print item serial number, i have taken whinh431.cser field in array, if it has multiple quantity it should print all item serial numbers respect to particular shipment.
Reply With Quote
Sponsored Links
  #4  
Old 16th August 2018, 19:12
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,110
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
In detail.10 are you printing v.serl? Put it in debug mode and step thru it right off hand I am not seeing anything standing out in the code - I would role thru get.serial.no and make the arrays are loaded correctly.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 15:54
Help with Custom Report pbenven Tools Development 5 27th February 2011 04:33
how to print 2 non-continuous detail section in a report funnyguy Tools Development 7 16th July 2010 11:59
Print Replenishment Picking List for Shortages Item edo_limbat Blogs and Web links 0 20th March 2009 10:47
3GL ASCII-Menu System for ERP-LN AndreasSchmitt Tools Development 7 5th June 2008 12:07


All times are GMT +2. The time now is 02:31.


©2001-2018 - Baanboard.com - Baanforums.com