Home Information PDF Documents EULANDA Handbooks Training Book's corner Download Contact us Table of Contents About us

Glossary

Password needed Newsgroup

Remote Support system

cn_VLOG_Tagesabschluss (SQL API)

Back | Level back

Over this procedure a package dispatc´hing program can query such as VLOG in which mode of operation it to be is. In the standard mode there are to be in the polling Polling-operation and call up further whether transmissions are to be processed. However if the daily closing for a mandator and a carrier is signaled, then the Polling-operation is to be adjusted for this time and be accomplished the daily closing to the indicated mandator and carrier.

Syntax

cn_VLOG_Tagesabschluss
  @Action (varchar(10), Input)
  @Value (bit, Input/Output)
  @Mandator (varchar(40), Input/Output)
  @Carrier (varchar(20),  Input/Output)

Argument

@Action (varchar(10), Input)

Over this value the instruction is specified. The dispatch often commodity will usually use the instruction "GET RESET". In the case can by indication of the carrier be queried whether a daily closing to be made is. After selections of the value this is put back automatically.

One does not hand over @Action, then the default values is automatic "GETRESET“.

Following values are possible:
 

GET Over the value GET can be queried a value. The result is handed over into @Value.
GETRESET This instruction works we GET, however after the selection the value is put back automatically to "0"
SET With this instruction SET can be set a value.

Special case
To simplified selections, whether a daily closing is to be accomplished, the procedure with empty parameters can be called. In this case @Value, @Mandator and @Carrier than expenditure the first entry to supply, for which a daily closing is to be accomplished.
If a daily closing is to be accomplished with no mandator and with no carrier, then supplies @value 0.
Since the default is "GETRESET“, after inquiry the signal is put back to 0.If the value is to remain received, then must be worked with @Action ='GET' and after conclusion of the daily closing is to be handed over with @Action='SET' for the appropriate mandator ad carrier @Value=0.

@Value (bit, Eingabe/Ausgabe)

If @Action with the instruction "SET" is occupied, then a @Value input value is and sets these in the data base. With the methods GET and GETRESET contain the @Value selected value. The value 1 meant that a daily closing is to be accomplished, the value 0 however that the dispatch often commodity is to remain further in the Polling

@Mandator (varchar(40), Input/Output)

If @Action the value "GET“, "GETRESET“ or NULL with delivery of a mandator value the daily closing for this mandator are queried known. If no mandator name is indicated (NULL or to omit), accomplished the inquiry for the main mandator, which is the mandator to that the current data base belongs.

To test purpose the daily closing signal for a certain mandator can be set. For this the mandator must however in the data base as valid admits to be. For setting a value must contain @Action='SET'.

Are more @Carrier and @Mandator without contents (=NULL), then the special case described above applies.

@Carrier (varchar(20), Input/Output)

The supported modes of shipment, which are agreed upon with VLOG already in the view EXPORT_VLOG_Sendung_Alle described.

Are more @Carrier and @Mandator without contents (=NULL), then the special case described above applies.

Example 1

declare 
  @e int,
  @value bit
exec @e = cn_VLOG_Tagesabschluss @value=@value out, @Mandator='PV', @Carrier='DPD'
Select @value [Daily closing]

In this example it is queried whether a daily closing for the carrier "DPD“ is to be accomplished related to the mandator "test specification". At a return value of "1" a daily closing is to be accomplished. After call of the value the value is put back internally to "0", so that a renewed call will result in the value "0"

Example 2

declare 
  @e int,
  @value bit,
  @Mandator varchar(40),
  @Carrier varchar(20)
SET @Mandator=NULL
SET @Carrier=NULL
exec @e = cn_VLOG_Tagesabschluss 
              @value=@value out,
              @Mandator=@Mandator out, 
              @Carrier=@Carrier out
Select @value [Daily closing], @Mandator [Mandator], @Carrier [Carrier]

In diesem Beispiel wird abgefragt, ob ein Tagesabschluss für einen beliebigen Mandanten und einen beliebigen Frachtführer vorliegt. Wenn @value=1 ist, so ist ein Tagesabschluss durchzuführen. Die Variable @Mandant und @Frachtfuehrer enthalten die Daten für welchen Mandanten und Frachtführer dies zutrifft. Da @Action nicht übergeben wurde wird automatisch nach den Lesen ein Reset durchgeführt. Das bedeutet ein direkter Neuaufruf liefert @value=0.

Beispiel 3

declare 
  @e int,
  @value bit,
  @Mandant varchar(40),
  @Frachtfuehrer varchar(20)
SET @Mandant=NULL
SET @Frachtfuehrer=NULL
exec @e = cn_VLOG_Tagesabschluss 
              @Action='GET',
              @value=@value out,
              @Mandant=@Mandant out, 
              @Frachtfuehrer=@Frachtfuehrer out
Select @value [Tagesabschluss], @Mandant [Mandant], @Frachtfuehrer [Frachtfuehrer]

In this example it is queried whether a daily closing for any, mandator and any carrier is present . If @value=1 is,  then is a daily closing to accomplish. The variable @Mandator and @Carrier contains the data for which mandator and carrier this applies. The value is not put back in the data base, since @Action only one read operation makes. The value can be put back by application over the instruction 'SET' explicitly.

Example 4

cn_VLOG_Tagesabschluss 
              @Action='SET',
              @value=0,
              @Mandator='MUSTERMANN', 
              @Carrier='DPD'

In this example the daily closing is put back to 0. Here particularly for the mandator  "MUSTERMANN“ and the carrier "DPD“.

Example 5

cn_VLOG_Tagesabschluss 
              @Action='SET',
              @value=0,
              @Carrier='DPD'

In this example the daily closing is put back to 0.Here particularly for the main mandator and the carrier "DPD“. The main mandator is the mandator to that the opened data base belongs.

Example 6

cn_VLOG_Tagesabschluss 
              @Action='SET',
              @value=1,
              @arrier='DPD'

In this example the daily closing is set to 1 and forced thereby. Here particularly for the main mandator and the carrier "DPD". The main mandator is the mandator to the the data base belongs