How to differentiate the Local and Variable?

By | September 29, 2015

You may come across the situation where you want more details what is the different between Local and variable while calling the subprog. Sage X3 has a special feature in it to assign the record by ref or by value.

New Stuff:How to set Authorized Credit control for a customer for all companies?

Syntax:

Subprog SETBPC(ITMREF)

Local/Variable Char ITMREF

End

Description:

Subprog:   keyword for X3’s sub program.
SETBPC:  name of the sub program.
ITMREF: argument list(s).

Local/Variable: Use the variable (by ref) if the input could be changeable in sub program else keeps it as Local (by value).

End: End of the sub program.

The Local (by value) meant for only read only input. It not will be changed by the calling function. The input of web services mostly is used by the Local.

The Variable (by ref) meant for write access, we can change the value in/by the calling function. The output will be updated record retrieved. It has been used while using the X3 web services for output values.

Example:

Here we are calling the SETBPC Subprog and passing the Product as an input.

1

Here we have two subprog examples based the Local/Variable.

The 1st is example of write access. We can modify the value. Initially we are passing the value as ‘21120’ and the after calling the SETBPC, the value gets changed into ‘check1’.

1

The 2nd is example for the read only access. The input value cannot be changed by this subprog, because it declared as a Local. It has read access only. So we are getting the below error.

1

Hope this helps you.

About Us
Greytrix – a globally recognized Premier Sage Gold Development Partner is a one-stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development and implementation expertise.

Greytrix caters to a wide range of Sage Enterprise Management (Sage X3) offerings – a Sage Business Cloud Solution. Our unique GUMU™ integrations include Sage Enterprise Management (Sage X3) for Sage CRMSalesforce.com and Magento eCommerce along with Implementation and Technical Support worldwide for Sage Enterprise Management (Sage X3). Currently we are Sage Enterprise Management Implementation Partner in East Africa, Middles East, Australia, Asia. We also offer best-in-class Sage X3 customization and development services, integrated applications such as POS | WMS | Payment Gateway | Shipping System | Business Intelligence | eCommerce and have developed add-ons such as Catch – Weight  and Letter of Credit for Sage Enterprise Management to Sage business partners, end users and Sage PSG worldwide.

Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace; GUMU™ integration for Sage Enterprise Management – Salesforce is a 5-star app listed on Salesforce AppExchange.

For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com. We will be glad to assist you.