cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass the value from VARGB operation?

duma_gordon
Explorer
0 Kudos

I am using below operations to successfully get the days from the Hiring date. I want to compare the joining date with 15th of that month;

TABLEP0000

VALEN 2

VAOFF 6

VARGBBEGDA

01

02

**

the problem is, the days could be from 01 to 31, I don't want to list 31 combinations, how can I pass the VARGBBEGDA key value to NUM or AMT? or how can make a comparison > 15 or <15?

Pls share your comments, thanks

Gordon

Accepted Solutions (1)

Accepted Solutions (1)

belbaraka_naima
Explorer
0 Kudos

Hi YiShun,

if you want to compare the number of days to 15 I propose the following cycle (see capture), for me the date system is written as YYYYMMDD example 20180503 for May 03, 2018

belbaraka_naima
Explorer
0 Kudos

hope this answer helps Duma

Answers (2)

Answers (2)

duma_gordon
Explorer
0 Kudos

Hi YiShun,

The TABLE operation doesn't always work, if there are multiple records in a internal table, or table has a header line, TABLE operation can't bypass the header line, therefore returned incorrect value.

after DATES function, all the date type stores in an internal table DATUMDRUM,,, is there an operation can read table content from this internal table?

Anyone who had worked on this, pls share your comment, thanks

Gordon

former_member94258
Active Participant
0 Kudos

NUM=BBEGDA, AMT=BBEGDA.

You can check the document of operation VARGB and TABLE.

The docuemnt of B used in NUM or AMT is like below.

B Tables
With the TABLE operation, when the system processes a
personnel calculation rule it calls a particular table.
With operand B for operations NUM, RTE, and AMT,
the system finds the line of this table that is
relevant to the employee for whom payroll is currently
being performed. The value of this field, which is
entered at locations nnnnn, is written to the current
NUM, RTE, or AMT field. For the field names, see
the Data Dictionary

duma_gordon
Explorer
0 Kudos

Thanks for your reply. however it does not solve my issue. BEGDA is a date type, however both NUM and AMOUNT and number and amount type.(XXX.00). when using the operation NUM=BBEGDA, AMT=BBEGDA. is used, it automatically convert the date type into an integer, so I can not using these two operation to get the days from the date.

by the way, I am using "TABLEP0000" to read the entry date, if there are multiple records in P0000, how do I loop with this table, pls advise, thanks