Skip to main content
Skip table of contents

Sage: create routing line item (CreateRoutingLineItem)


Sage: create routing line item (CreateRoutingLineItem)

Create a line item in a routing. Multiple parameters can be filled with their corresponding values in the input parameter group. The arrays aplnr, agbs, arbplatz and kostst are required. The following parameters can be used: agaltern, agart, agben, agben_fremd, agbs, aggruppe, agmenge, agpos, anz_bedien, anz_huebe, aplidentnr, aplnr, aplvar, arbplatz, beregelung, bezte, chverfolg, datvon, einl_faktor, fam, frzeit, genau, identnr_fremdb, kavitaet, kn_milestone, kn_unterbr, konto, kostst, kurzben, kurzben_fremd, kz_durch, kz_kannag, kz_spl, kz_ueb, la, lgrp, lhs, lizeit_nach, lizeit_vor, maminlastzt, mate, matr, mauez, max_spl, me_bearb, mehrm, menge_bearb, muezeit, ncprognr, pers_grp, splmenge, stagnr, te, teko, tpzeit, tr, trko, txt_nr, uebmenge, uebproz, uezeit, useraen, userneu, var_fremdb. Hint: if the arrays teko and trko are to be filled, the array agbs must also receive an appropriate value and the arrays identnr_fremd and konto must also have appropriate values. The function returns the data for the line in a parameter group after its creation. The same parameter group can be used for input and output. If an indexed parameter group is present, the index must also be entered. If the line cannot be created, the service delivers a corresponding error message. This is entered via the parameter Message. Before evaluating the output parameter group, the parameter Message should be verified.

The following parameters in the parameter group are filled: aendnr, agaltern, agart, agben, agben_fremd, agbs, aggruppe, agid, agmenge, agpos, anz_bedien, anz_huebe, aplidentnr, aplnr, aplvar, arbplatz, beregelung, bezte, chverfolg, datvon, einl_faktor, fam, frzeit, genau, identnr_fremdb, kavitaet, kn_milestone, kn_unterbr, konto, kostst, kurzben, kurzben_fremd, kz_durch, kz_kannag, kz_spl, kz_ueb, la, lgrp, lhs, lizeit_nach, lizeit_vor, maminlastzt, mate, matr, mauez, max_spl, me_bearb, mehrm, menge_bearb, muezeit, ncprognr, pers_grp, splmenge, stagnr, te, tpzeit, tr, uebmenge, uebproz, uezeit, useraen, userneu, var_fremdb.

Syntax:

Status = f$SageService ( Service , 'CreateRoutingLineItem' , 'PGINPUT' , 'PGOUTPUT' )

 

Argument

Type

Meaning

 

Service

String

URL of the web service

 

'CreateRoutingLineItem'

String

Command constant

 

'PGINPUT'

String

Name of the ePOS parameter group with the data for the line.

 

'PGOUTPUT'

String

Name of the ePOS parameter group with the result data for the line.

Result:

Integer

Status of the function:

1 : the service function was successfully called

-1 : the component eposvbcomexe could not be found

-2 : function URL not entered

-4 : general error

Example:

CODE
proc void create_routing(  )
{
   int i;
   int Quantity;
   string PGName;

   // Enter service name
   B7Service = 'http://b7demo.sagebaeurer.de/br71/callin/epos_soap';

   // Enter routing header data
   arpl_kopf.aplidentnr = 'BNUESSLE-T02';
   arpl_kopf.art = 1;

   // Enter routing line data
   arpl_pos[1].agbs = 10;
   arpl_pos[1].arbplatz = 103;
   arpl_pos[1].kostst = 0;
   arpl_pos[1].agben = 'Saegen';
   
   arpl_pos[2].agbs = 10;
   arpl_pos[2].arbplatz = 121;
   arpl_pos[2].kostst = 1;
   arpl_pos[2].agben = 'Montieren';

   // Create routing header
   Status = f$SageService ( B7Service , 'CreateRouting' , 'arpl_kopf' , 'arpl_kopf' );
   if (f$IsNullString('arpl_kopf.aplnr') == 0)
   {
      f$Message ('Sage Message', Message);
      return ();
   }

   // Create BOM items
   Quantity = 2;
   for ( i=1;i<=Quantity;i=i+1)
   {
      arpl_pos[i].aplnr = arpl_kopf.aplnr;
      PGName = 'arpl_pos[' + f$FtoS(i) + ']';
      Status = f$SageService ( B7Service , 'CreateRoutingLineItem' , PGName , PGName );
   }
   p$anzeige_ergebnis('arpl_kopf' );
   p$anzeige_ergebnis('arpl_pos' );

}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.