Approval For Marketing Documents
Hi All,
i would like to set an approval procedure for te marketing documents; let's say purchase order; so that if the posting date differs from the date of the posting period, the document should go for approval. I would like to put an approval for back end data entry. How to handle this??
Thanks,
Joseph
Hi Joseph,
Gordon & Suda both are Correct.
Try to Create the below Query and Assign the Approval Procedure Terms.
SELECT 'TRUE'
IF MONTH(GetDate()) != MONTH($[$10.0.Date])
IF MONTH(GetDate()) != MONTH($[$10.0.Date]
SELECT 'TRUE'
OR
SELECT 'TRUE' WHERE MONTH(GetDate()) != MONTH($[$10.0.Date])
Regards,
Madhan.
Similar Messages
-
Create User-defined field for Marketing Documents
I need to create a User-Defined field for Marketing Documents under Title and Rows.
I need to do it via .NET instead of manually go into SAP to create it.
Does anyone can give me idea on how to do this?Hi David,
There are examples of how to do this in the SDK samples (look for MetaDataOperations project in the DI samples).
There are also examples in the SDK help. Here's one:
Private Sub AddUserField()
'// The UserFieldsMD represents a meta-data object that allows you
'// to addremove fields from tables or change the fields' characteristics
Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
'// In any meta-data operation there should be no other object "alive"
'// but the meta-data object, otherwise the operation will fail.
'// This restriction is intended to prevent a collisions.
'// The meta-data object needs to be initialized with a
'// regular UserFields object
Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
'// When adding user tables or fields to the SAP Business One database
'// use a prefix identifying your partner name space
'// this will prevent collisions between the various partners add-ons
'// SAP's name space prefix is "BE_"
'// Set the Fields' mandatory properties
oUserFieldsMD.TableName = "OCRD" '// BP table
oUserFieldsMD.Name = "BE_UserField1"
oUserFieldsMD.Description = "A user field"
oUserFieldsMD.Type = db_Alpha '// am alphanumeric type
oUserFieldsMD.EditSize = 20
'// Add the field to the table
oUserFieldsMD.Add
End Sub
Kind Regards,
Owen -
Approval for parked documents in FI
Hi,
I have a requirement to sent approval SAP screen as attachment to external mail address. for parked documents through (FB01)
to achive this i need some help .
step 1: how to start workflow when document getting parked
standard event (in FIIP) is not getting triggered
i seached BADI's to write trigger evet FM but i m not getting badi which will return the parked document number and company code and year
please guide me
Thanks in Adv
Srinivasan.RHello,
Please search SDN & SAP Library for workflows in parked documents. For example with the following document you should get some idea (look the workflow configuration steps part). Basically you need to do some configurations in SPRO in order to get the events triggered.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c047fa-e64a-2e10-fda1-9ee0f7c24b7e?quicklink=index&overridelayout=true
Regards,
Karri -
Approval for Delivery Document
Hi Experts,
My question is related to Delivery Document that how can we amend the Delivery document again, because they compare the Packing list PLDS.(Right Click to find the Packing list).So there is any solution for that.In Simple word they want to change the information in Delivery Doc becaue they don't sure about there Rate & Quantity.
Regards
AmolHi Amol
you can not able to change the delivery after you added in the system. But you can set that as approval stages.
Define the approval stages and check it out
Ashish Gupte -
Approval Stages- Marketing Documents
Dear All
I am working on SAP Business One 8.81 PL 06 and SAP Business One 8.82 PL00 (Test Enviroment)
In both the version approval process is not working . I defined Approval stages, Template and condition as Always.
Please let me know is there any changes are made in those version. Consultancy issue ?
Thanks & Regards
Ashish GupteHi,
Check the following document to be sure that the steps you are taking are correct with respect to approval procedure :
[Approval Procedure|https://websmp202.sap-ag.de/~sapidb/011000358700001075022009E/HowTo_AppProcedures_2007.pdf]
Kind Regards,
Jitin
SAP Business One Forum Team -
Get error when preview marketing documents by using crystal report layout
Hi experts,
I want to switch to using Crystal Report for marketing documents layout. I have import Sales Quotation u2013 Generic (CR) layout which provided by XX-1.2.b1p package. I can preview added records but it doesn't work on drafting documents and saved drafts. The system prompt u201CThe system cannot find the path specifiedu201D and u201CObject reference not set to an instance of an objectu201D. On the same server, it was working fine in our other company database. I don't think this is the problem of database location setting in Crystal Report. Can anyone give me advices, thanks!
Regards,
IvanHi! Rahul,
Thank you for your reply first. Your method doesn't work in my case. Can you tell me the steps of creating a new layout for added records and draft documents. I have created a quotation layout which work with added records only, the steps has been show below and please comments, thanks.
1. In Crystal Report > new blank report > create new connection > Choose "SAP Business One" > Select OQUT under "B1 Tables".
2. Insert "CardName" field to report > Create DocKey@ parameter and set it equal to DocEntry in select expert record function
3. Click Add-ins > SAP Business One > Save > Choose company database and input manager password.
Regards,
Ivan -
To Activate the Approval Process when document is in update mode
Dear Expert,
I have applied the Approval Process for UDF using the query "Select Distinct 'True' From ORDR T0
Where IsNull($[ORDR.U_Rebate.number],0)>0 and $[ORDR.DocType]='I' ".
Now as the field is UDF user is able to modify even after approval procedure.
Please help me to apply the above query for the Approval process even when the document is in update mode.
regards,
PankajKDear Pankaj,
Current B1 design only support approval for adding document. Update will not trigger approval.
You may use SP_TN instead to block user updating it. If you are not familiar with the SP, search the forum first.
Thanks,
Gordon -
DI API/DI Server Access to Approve Marketing Documents (Approval Procedures
a. Many of my clients require the functionality to remotely approve Marketing Documents
b. Currently the DI allows for the creation and updates of Approval Stages and Templates
c. There is no mechanism to approve Marketing Documents through the DI API / DI Server
d. This functionality is urgently required
e. It is specifically required to access the Marketing Document marked for approval and approve/reject these Documents via the DI APIHow to do it:
SAPbobsCOM.ApprovalRequestsService oApprovalRequestsService = null;
SAPbobsCOM.ApprovalRequestParams oApprovalRequestParams = null;
SAPbobsCOM.ApprovalRequest oApprovalRequest = null;
SAPbobsCOM.ApprovalRequestDecision oApprovalRequestDecision = null;
oApprovalRequestsService =
(SAPbobsCOM.ApprovalRequestsService)MyCompanyService.GetBusinessService(
SAPbobsCOM.ServiceTypes.ApprovalRequestsService);
oApprovalRequestParams =
(SAPbobsCOM.ApprovalRequestParams)oApprovalRequestsService.GetDataInterface(
SAPbobsCOM.ApprovalRequestsServiceDataInterfaces.arsApprovalRequestParams);
int wddCode = 1;
oApprovalRequestParams.Code = wddCode;
oApprovalRequest = oApprovalRequestsService.GetApprovalRequest(oApprovalRequestParams);
oApprovalRequestDecision = oApprovalRequest.ApprovalRequestDecisions.Add();
oApprovalRequestDecision.Status = SAPbobsCOM.BoApprovalRequestDecisionEnum.ardApproved;
oApprovalRequestDecision.ApproverUserName = SAPB1UserName;
oApprovalRequestDecision.ApproverPassword = SAPB1Password;
oApprovalRequestsService.UpdateRequest(oApprovalRequest);
Hope it helps
D. -
Searching DI API Property for column text in marketing document
Hi,
I am searching the property for entering information into the column rdr1.text.
I found the following information in the help file:
ItemDetails Sets or returns the item details in the marketing document line.
Field name: Text.
Length: 16 characters.
Text Returns the text property.
Field name: text.
Both properties are not working because the second one is a read only field.
Thanks and Regards ChrisHello Chris,
you may try the property "FreeText" of DocumentLines.
Cheers,
Roland
PS.:
You can switch on the system-information (CtrlShiftD).
Then in the bottom of B1 the propertys of a form-field are shown on mouseover. This helps often to find the right keyword for the SDK-Help.
In this case it shows the column name in DB: "FreeTxt"
Edited by: Roland Toschek on Mar 10, 2009 3:07 PM -
How to call workflow approve service in loop for multiple documents.
i have created a serviceHandler for approving the document and i post the comma separated dIDs as a string from workflow approval template(custom template). And in serviceHandler program i pass the did for approving and only first document is approved and for other document its throwing error, Its showing error document revision is not a latest revision but document is having only one revision.
my code is: can anyone help me.
public void SendAllDocuments()
throws DataException, ServiceException{
try{
String [] ContentDids;
System.out.println("+++++++here we are the all SendAllDocuments++++++++++++++");
String workflowIds = m_binder.getLocal("workflowIds");
if(!workflowIds.isEmpty()){
ContentDids = workflowIds.split("\\,");
}else{
throw new ServiceException("document are not selected from users, workflowIds"+workflowIds);
int arrayLength = ContentDids.length;
for(int iterator=0;iterator<=arrayLength-1;iterator++){
SendDocumentToUserQueue(ContentDids[iterator]);
}}catch(Exception e){ e.printStackTrace();}
m_workspace.releaseConnection();
//DocMeta table varible which are coming from Internal assignment page
//xWF_SentFrom",xWorkflowStepAlias",xWF_SendTo",xPurposeForSubmission",xPurposeForRejection",xDocApproval",xWorkflowComments"
//xInternalAssignment",togroup",xWF_SendToSend",xWF_SendToSend12",xPurposeForSubmissionSend",xWF_SendToApprove",wfSendApproveComments"
//Revision table variable which can get from getRevisionsTableValueFromDid
// dDocName", dDocType",dRevLabel",dSecurityGroup",dDocAccount"
public void SendDocumentToUserQueue(String approvalId) throws DataException, ServiceException{
try{
DataResultSet resultset =getRevisionsTableValueFromDid(approvalId);
String sendToName = m_binder.getLocal("sendToName");
String sender="takuma";
//String workflowComments = m_binder.getLocal("workflowComments");
String workflowReason = m_binder.getLocal("workflowReason");
m_binder.putLocal("IdcService", "WORKFLOW_Approve");
m_binder.putLocal("idcToken", m_binder.getLocal("idcToken"));
m_binder.putLocal("dID", approvalId);
m_binder.putLocal("xWF_SendTo", sendToName);
m_binder.putLocal("xPurposeForSubmission","108");
m_binder.putLocal("xWF_SentFrom", sender);
m_binder.putLocal("xWorkflowStepAlias", "");
m_binder.putLocal("xPurposeForRejection", "");
m_binder.putLocal("xDocApproval", "");
m_binder.putLocal("xWorkflowComments", "");
m_binder.putLocal("xInternalAssignment", "");
m_binder.putLocal("xWF_SendToSend", "");
m_binder.putLocal("dDocName", getData(resultset,"dDocName"));
m_binder.putLocal("dDocType", getData(resultset,"dDocType"));
m_binder.putLocal("dRevLabel", getData(resultset,"dRevLabel"));
m_binder.putLocal("dSecurityGroup", getData(resultset,"dSecurityGroup"));
m_binder.putLocal("dDocAccount", getData(resultset,"dDocAccount"));
executeService(m_binder, sender);
}catch(Exception e){ e.printStackTrace();}
public DataResultSet getRevisionsTableValueFromDid(String documentId) throws DataException, ServiceException{
DataResultSet drs = new DataResultSet();
try{
/*String sqlDocType="select dDocType from revisions where dId ='"+documentId+"'";
ResultSet documentRset = getSystemWorkspace().createResultSetSQL(sqlDocType);
//handle null pointer exception for DocumentValue
String DocumentValue = ResultSetUtils.getValue(documentRset, "dDocType");*/
String sql="select dDocName,dDocType,dRevLabel,dSecurityGroup,dDocAccount from Revisions where dId ='"+documentId+"'";
ResultSet rset = getSystemWorkspace().createResultSetSQL(sql);
if (rset == null || rset.isEmpty()) {
SystemUtils
.info("Resultset is null please check database query and Did ="+documentId);
drs.copy(rset);
catch(Exception e){
System.out.println("in catch of getRevisionId Method");
e.printStackTrace();}
//handle null pointer exception for DocumentValue
return drs;
public String getData(DataResultSet dataSet, String value) {
String fieldValue = "";
fieldValue = ResultSetUtils.getValue(dataSet, value);
System.out.println(fieldValue+"value is null in getData Method=======");
return fieldValue;
public UserData getFullUserData(String userName, ExecutionContext cxt,
Workspace ws) throws DataException, ServiceException {
if (ws == null)
ws = getSystemWorkspace();
UserData userData = UserStorage.retrieveUserDatabaseProfileDataFull(
userName, ws, null, cxt, true, true);
//ws.releaseConnection();
return userData;
public Workspace getSystemWorkspace() {
Workspace workspace = null;
Provider wsProvider = Providers.getProvider("SystemDatabase");
if (wsProvider != null)
workspace = (Workspace) wsProvider.getProvider();
return workspace;
public void executeService(DataBinder binder, String userName)
throws DataException, ServiceException {
// obtain a connection to the database
Workspace workspace = getSystemWorkspace();
// check for an IdcService value
String cmd = binder.getLocal("IdcService");
if (cmd == null)
throw new DataException("!csIdcServiceMissing");
// obtain the service definition
ServiceData serviceData = ServiceManager.getFullService(cmd);
if (serviceData == null)
throw new DataException(LocaleUtils.encodeMessage(
"!csNoServiceDefined", null, cmd));
// create the service object for this service
Service service = ServiceManager.createService(serviceData.m_classID,
workspace, null, binder, serviceData);
// obtain the full user data for this user
UserData fullUserData = getFullUserData(userName, service, workspace);
service.setUserData(fullUserData);
// binder.m_environment.put("REMOTE_USER", userName);
ServiceException error = null;
try {
// init the service to not send HTML back
service.setSendFlags(true, true);
// create all the ServiceHandlers and implementors
service.initDelegatedObjects();
// do a security check
service.globalSecurityCheck();
// prepare for the service
service.preActions();
// execute the service
service.doActions();
// doany cleanup
service.postActions();
// store any new personalization data
service.updateSubjectInformation(true);
service.updateTopicInformation(binder);
} catch (ServiceException e) {
varTrueFalse = false;
error = e;
SystemUtils.info("exception in second location=" + e);
e.printStackTrace();
} finally {
// Remove all the temp files.
service.cleanUp(true);
// handle any error
if (error != null) {
error.printStackTrace();
if (binder.getLocal("StatusCode") == null) {
binder.putLocal("StatusCode", String.valueOf(error.m_errorCode));
binder.putLocal("StatusMessage", error.getMessage());
} else {
throw new ServiceException(error.m_errorCode,
error.getMessage());I guess it is caused by the fact that some of variables in the binder refer to the first workflow item. My bet would be dDocName.
Try to find out what's in the binder if you approve the second item from GUI and what's there when you do it from your program. That should give you enough info what you need to change. -
Workflow for marketing plan approval
Hello everyone,
Does anyone know if there is a standard workflow for approval of marketing PLANS (I don´t mean campaigns)??
Best regards,
EfrainHi Jaya,
I haven't used this particular workflow but hopefully the following is of use:
- Email to initiator- the likely explanation is that the workflow has not identifed the recipient's email address. Follow steps 4 & 5 from the Blog and this should resolve the issue.
- Cancelled Event - The wait step listens out for the triggering of the corresponding event on the BOR object.
i.e. for this workflow wait step 164 is listening out for CANCELLED to be raised on that particular instance of BUS2010020.
If this is triggered that branch of the fork will be triggered.
- Locked/Rejected - There is no step (that I can see) that notifies the initiator that the campaign has been locked.
However you can add your own Send Mail step(s). An alternative approach would be to have additional branches that listen for the BUS2010020.locked and the rejected events and then have your Send Mail steps, however this is probably overcomplicating the solution.
- Schedule condition and start condition - Again I haven't used campaigns yet but in the Blog they are using the Marketing Project Campaign BOR Object status profile and status table - look at object BUS2010020 in SWO1.
I hope that this is of use.
Best Regards,
Trevor -
Hi experts,
I need SP_TN for specific user must use specific document series and warehouses in Marketing Documents SAP B1.
Kindly give solution ASAP.
Thanks in advanceHi Nagarajan,
It show (1) Not allowed to add PO.
I used the following SP
IF @object_type = '22' AND @transaction_type IN (N'A',N'U')
BEGIN
IF Exists
(SELECT T0.DocEntry FROM POR1 T0 INNER JOIN OPOR T1 ON T0.DocEntry = T1.DocEntry
WHERE T1.DocType = 'I' AND T1.Series = '142' OR T1.Series = '145' AND T0.[WhsCode] = 'STEX-01'
or T0.[WhsCode] = 'STNEX-01' and T1.[UserSign] ='1'
and T1.docentry = @list_of_cols_val_tab_del)
BEGIN
SELECT @error = 1
SELECT @error_message = 'Not allowed to add PO'
END
END
warm regards,
Guhan -
Decimal Place settings for 'Total' field in Marketing documents.
Dear sir,
I'm Using SAP B1 2005B Patch Level 5
I want to know which Decimal places setting i have to set for'Total'
Field in all Marketing documents.I want to know whether it come's under
Prices settings or Amounts setting.Jambulingam,
The no. of decimals is set in the Administration -System Initialisation - General settings - Display tab . There on the left hand side you can see the settings for decimals.
Since it is a total you wil have to set it for Amounts.
Nagesh -
FMS required for Row Level in Marketing document for Dimensions vs BP
Dear All,
I need some help in regards to the FMS in SAP Business One. I am trying to use Dimension in the row level of my marketing document. In Dimension 2 and Dimension 3 I have named them as Dimension 2 whose description is Regions and in Dimension 3 whose descrption is Area.
Now in Cost Accounting I have setup the Profit Centers in Dimension 2 Region as under :
Factor Code Factor Description
CD0201 Region 1_Asia
CD0202 Region 2_Middle East
Also I have setup the Profit Centers in Dimension 3 Area as under :
Factor Code Factor Description
CD0201A India
CD0201B Pakistan
CD0201C China
CD0202A Syria
CD0202B Saudi Arabia
I have created a udf in the Business Partner Header as U_DCostRegion wherein I have set Valid Values for Field as under which the user will put
Value Description
CD0201 Region 1_Asia
CD0202 Region 2_Middle East
In the Business Business Partner Territory the BP has been defined as per the Dimension 3 Area. In which for e.g C0001 territory is India, C0002 territory is Pakistan and so on
Now my requirement :
I want that if the user is doing a Sales Quotation or Sales Order from the Sales Quotation then in the Row level Dimensions column of Regions and Area automatically through FMS it should populate the data accordingly as to what is put in the BP master Data. For Example user is doing Sales Quotation for C0001 whose Area ( U_DCostRegion) is set as CD0201 Region 1_Asia and Territory is set as India then automatically in the Sales Quotation row columns of Region and Area values of CD0201 Region 1_Asia and CD0201A India should come.
I think this requirement can be fullfilled by FMS but I am not able to do it from my end. Please advise what should be the FMS for it.
Regards,
DepikaDear Rahul,
I am able to put the Region from the Business Partner UDF to the document Row of Region column with the FMS as SELECT $[OCRD.U_DCostRegion] as in the U_DCostRegion I had set Valid Values for Field as
Value Description
CD0201 Region 1_Asia
CD0202 Region 2_Middle East
As in the Dimension in Marketing document it takes the Factor Code e.g CD0201 so I am able to handle it with the above FMS.
But for the Area dimension I am not able to make the FMS because in the marketing document it takes the Factor Code means the Factor Code e.g CD0201A and its not linked to the BP Territory Table of OTER.
I want a FMS which is linked with the OTER Table also as such if in the BP the territory ( avaliable in base product BP > General Tab > Territory ( where its defined as India for BP C0001) should link to CD0201A which is the Factor Code wherein the Factor Description is India.
please advise in this regard.
Regards,
depika -
Approval-process for publishing documents in Collaboration-Room
Hi @ all,
is it possible to use a approval-process for publishing documents form the private document store of a collaboration room to the public one? I it is, how I have to do it, I have no idea?!?
Or is there a way to give specific users the right to publish a document.
Thanks for your response!
Best regards
KaiKai -
I'm not sure about publishing from private to public. However, you can set-up folders in the Collaboration rooms to enable State Management. To do this, you'll need to use a system principal to alter the permissions on the specific Collaboration room document folder.
Regards,
Kyle
Maybe you are looking for
-
Need to create a block based on procedure
We can create a block based on procedure...but whats the need to do so...please can anybody explain.
-
I can't open pdf from webpages
I have Adobe Acobat 6 Professional with upgrade and have updated. I also have installed Adobe Reader 9. The problem is that when I click on a pdf file from a web page the error is that I get reads; The Adobe Acrobat/reader that is running ca not be u
-
Trying to understand a callable statement
i am having trouble understanding CallableStatements i have this code Connection conn = null; try conn = OdLauncher.getDbConnection(USERID, PWD, SERVER); CallableStatement cs = conn.prepareCall("{? = CALL " + QUERYPROC + "(?)}");
-
Hi. I have a MacBook and I am able to play purchased DVDs just fine. However when I try to play the home DVDs my brother burned for me on his new MacBook Pro it doesn't work. The DVD goes in, spins, does not mount, and then ejects. It plays on an old
-
MB51 item category of purchase order missing
Dear guru , I need to see in MB51 the item category of purchase order for all the 101 goods receipts mvt in order to distinguish subcontracting from standard purchasing. How can I obtain this ? Thanks in advance