Problem with fields

skorek

Well Known Member
Hi guys,

I have a strange problem with fields, or rather not a problem but question
how to do it?
So ...

File has field:
DOCO DCTO LNID
111111 T1 101


and then

field F1 is chars length 5
field F2 is chars lenght 6

and

how I can do that in dependent on value in f1 (could be chars 'DOCO' or
'DCTO' or 'LNID') value in F2 has suitable: 111111 or t1 or 101????

Is it possible??

Regards

Tomek
 
Tomek

I not exactly clear on the question that you're asking.

But if you're trying to join two tables on a field where one has a numeric
value and the other is an aphanumeric value in a World Writer query, then
here's the solution

For eg: file 1, field doco , 8 numeric eg: 123456

File 2, field adoco, 8 alphanumber, eg: "00123456"

Take doco and convert it to an alphanumeric value by calculating a new field
equal to DIGITS(doco)

Then join the new field to adoco


Thanx.
Eric

Eric M. Holm, CA
JDEdwards A7.3.8 and A7.3.10

B:   978-946-3269
Fax: 978-687-4305

600 Federal Street
Andover, MA  01810

=======================================================
My local time is ....

http://www.worldtimeserver.com/time.asp?locationid=US-MA

=======================================================

CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging to
CGI Group Inc. and its affiliates may be contained in this message. If you
are not a recipient indicated or intended in this message (or responsible
for delivery of this message to such person), or you think for any reason
that this message may have been addressed to you in error, you may not use
or copy or deliver this message to anyone else. In such case, you should
destroy this message and are asked to notify the sender by reply email.

Avis de confidentialité: Ce message peut contenir des renseignements
confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses
filiales. Si vous n’êtes pas le destinataire indiqué ou prévu dans ce
message (ou responsable de livrer ce message à la personne indiquée ou
prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous
ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu’un
d’autre. Dans ce cas, vous devez le détruire et vous êtes prié d’avertir
l’expéditeur en répondant au courriel.
 
Re: RE: Problem with fields

No Eric,

I don't want to join two tables.
I will try to explain it clearer :)

I have only one file from where I need retrieve some values.
The problem is that I don't know before calling program which field from this file I will be need.
user enter desirable field (name of field) i.e. in processing option
Sometimes it could be DOCO sometimes DCTO sometimes some other fileds.
But I don't know what user enter (which field) now, when I write the program code. It will not be fixed/constant.

My question is: how to "transfer" character ('DOCO') to real DOCO field and retrive suitable value for DOCO from the file?

Regards

Tomek
 
Re: RE: Problem with fields

Tomek,

I think what you are asking is exactly what JDE DreamWriter will do for you. You can write your own RPG and CL programs, and use DreamWriter to allow the user to tell the program what he/she wants to select for the report. This is done with Data Selection, not processing option.

If you do not know how to do this, I suggest you hire a consultant or look at one of the delivered JDE reports (the 'J' CLP program) so you can learn how to use this excellent feature. You then create a new set of DreamWriter versions for your program and tell DreamWriter what file the user can select values for fields. This is very basic JDE technical knowledge for any World programmer.
 
Re: RE: Problem with fields

Sally,

I have only 4 yrs experience with JDE but I know what is DW and what I can do with DW :)

The problem is that I don't know how to explain exactly what I want to do :)

I don't want the data selection.

I'll try explain it again.

Field SDDOCO - when you read record in sales datail, SDDOCO has some value (i.e. 1234) and SDDCTO (i.e. SD) SDLNID (i.e. 1000) and so on ...

Then I have work/temporary field
FTEMP (25 alpha)

Field FTEMP is not connected with any database field now.

Then somewhere is written that FTEMP should have following values (field CASE):
case 1: value for SDDOCO
case 2: value for SDDCTO
case 3: value for SDLNID

I know that the easiest way is use IF condition
IF CASE='1' (or IF CASE='SDDOCO')
MOVE SDDOCO FTEMP

IF CASE='2' (or IF CASE='SDDCTO')
MOVE SDDCTO FTEMP

IF CASE='3' (or IF CASE='SDLNID')
MOVE SDLNID FTEMP

But this way require to plan all possibilities. And when user want to add new cases I have to programming it.

i.e. case 4: SDDOCO + SDDCTO

IF CASE='4'
SDDOCO CAT SDDCTO FTEMP

When next case - next changes .... and so on

What I would like?

I want to add some AI to program :)

When user enter SDDOCO + SDDCTO
program should recognize this expression and do correct operation: catenate SDDCTO and SDDOCO

when user enter SDDOCO + SDDCTO + SDLNID + SDKCOO + SHSFXO + PHOORN
program should also recognize this expression and catenate all this fields.

It is not important where user enter this expression (proc opt, UDC, other field in some file)

program should transform chracter 'SDDOCO' to real SDDOCO field but WITHOUT using IF.

How to do it?

Regards Tomek
 
Tomek:

I guess you are trying to design a screen, where you would like to enter the field name in the screen field-1 (F1) and retrieve the corresponding value of that field from the database file and display it in the screen field-2 (F2). If so, I will suggest you to follow the below steps to achieve it:
1. Dump all file field information (DSPFFD) into a temporary file (FTEMP).
2. When user enters the field name on the screen-field-1 (F1), then read through the above temporary file (FTEMP) to get the start and end positions of this field name (Eg: SDDOCO). (Field name, start position, and length are stored in this temporary file FTEMP).
3. Read records from your database file and for each record read, substring the value from the database record using the start postion and length and load it into the scree field-2 (F2).

Hope this helps!
Sreeni Manda
SYSTIME
JDE World A7.3
 
Re: RE: Problem with fields

You need an RPG Program to do that. That cannot be achieve alone in DW.

Marsh




skorek
<[email protected] To: [email protected]
et.pl> cc:
Sent by: Subject: Re: RE: Problem with fields
jdeworld-bounces@j
delist.com


28/10/2004 17:56
Please respond to
PeopleSoft® World






Sally,

I have only 4 yrs experience with JDE but I know what is DW and what I can
do with DW :)

The problem is that I don't know how to explain exactly what I want to do :
-)

I don't want the data selection.

I'll try explain it again.

Field SDDOCO - when you read record in sales datail, SDDOCO has some value
(i.e. 1234) and SDDCTO (i.e. SD) SDLNID (i.e. 1000) and so on ...

Then I have work/temporary field
FTEMP (25 alpha)

Field FTEMP is not connected with any database field now.

Then somewhere is written that FTEMP should have following values (field
CASE):
case 1: value for SDDOCO
case 2: value for SDDCTO
case 3: value for SDLNID

I know that the easiest way is use IF condition
IF CASE='1' (or IF CASE='SDDOCO')
MOVE SDDOCO FTEMP

IF CASE='2' (or IF CASE='SDDCTO')
MOVE SDDCTO FTEMP

IF CASE='3' (or IF CASE='SDLNID')MOVE SDLNID FTEMP

But this way require to plan all possibilities. And when user want to add
new cases I have to programming it.

i.e. case 4: SDDOCO + SDDCTO

IF CASE='4'
SDDOCO CAT SDDCTO FTEMP

When next case - next changes .... and so on

What I would like?

I want to add some AI to program :)

When user enter SDDOCO + SDDCTO
program should recognize this expression and do correct operation: catenate
SDDCTO and SDDOCO

when user enter SDDOCO + SDDCTO + SDLNID + SDKCOO + SHSFXO + PHOORN
program should also recognize this expression and catenate all this fields.

It is not important where user enter this expression (proc opt, UDC, other
field in some file)

program should transform chracter 'SDDOCO' to real SDDOCO field but WITHOUT
using IF.

How to do it?

Regards Tomek
 
Thank you Sreeni Manda!!!

Your suggestion sounds interesting! :)

Regards

Tomek
 
Back
Top