Customer code
hi all ,
my scenario is ECC--XI--customer using synchronous communication.
I want customer code by java to test my scenario .
can anybody help me ?
thank you .
Dear Amit
thank you for your reply.
I want to send the following data from ecc to customer
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_FY_OUT ">
<zbranch>abc</zbranch>
</ns1:MT_FY_OUT>
Then customer received the data and reply to ECC with the following data
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_FY_IN ">
<zstatus>success</zstatus>
</ns1:MT_FY_IN>
Similar Messages
-
SSRS custom code for count in Report Footer
Hi All,
Please help me with the custom code used for below requirement
Debtor Name current 30+days 60+days 90+days
aaa 7000 0.00 0.00 10.00
bbb 5000 0.00 20.99 3.00
ccc 1000 0.00 0.00 0.00
Expected result in report footer :
0 1
2
if the value of 30+ , 60+ and 90+ columns >=1 then i have to display the count in Report footer,for that i have tried using a custom code like below :
Shared Dim OD As Integer=0
Public Shared Function Test(ByVal OP As Decimal) As Integer
If OP >= 1 Then
OD = OD + 1
Else
OD = OD
End If
Return OD
End Function
and using below code to display
Code.Test(Overdue)
but when i use this code in report footer is not displaying correct value.Please guide me where i am going wrong.
Please let me know if you need any other details.
Thanks in advance,
Samhith.Hi Samhith,
Per my understanding you what to count the rows which values >=1 and display them at the bottom of the table, you are trying to use the custom code to do this but failed, right?
I have tested in my local environment and find the custom code is not correctly, and I have an alternative method which is more easy and can work in both table and matrix.
As Vaibhav Chaudhari also mentioned that we can use the CountDistinct function, but more correctly, we can use the count() function and the RunningValue() function, because CountDistict will not count the duplicated values if they >=1.
Please find the expression as below:
=Count(IIf(Fields!Yourfield.Value>=1 , Fields!Yourfield.Value, Nothing))
OR:
=RunningValue(IIf(Fields!Yourfield.Value>=1 , 1, Nothing),Sum,"DataSetName")
If you still have any problem, please feel free to ask.
Regards
Vicky Liu -
How to execute custom code only when a specific node is selected in infoset
Hi,
We have written a piece of custom code under a node (P1045). Not all users will have access to this Infotype as it is related to Appraisals. So, when users (w/no access to 1045) try to run a Query for other info types data, they are getting error message 'Can not access 1045'. Custom code is getting generated whenever user runs a query. Tried to control custom code with simple IF condition by giving user name. Still generating 1045 code.
All users use same infoset, where a group of users has access to 1045 and another group does not have access to 1045.
Appreciate your inputs to get this resolved.
Thanks,
Swapna.Why don't you try another aproach, instead of adding the infotype to the infoset, create a new table as an alias (with the fields you want to show in regards to infotype 1045) and fill it in the node depending on the authorization check for that infotype in the code ?
I think that adding the infotype as a node will always get the data from the infotype regardless, that is why it's showing the error. -
Can I use Partial class to enhance a typed dataset without losing the custom code?
Hi All,
I wanted to see if I could use a Partial class for one of the datatable classes to add custom code so that when the dataset is regenerated I don't lose my code.
Partial public
Class
WA_MMTP_TrackerDataSet1
'Code for dataset
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
'Other code for datatable
end class
end class
I'd like to take the function FillbyClinicianId and put it in a separate partial class like so and remove the function by the same name from the original file (dataset file):
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
end class
But when I try this, the compiler gives the following errors:
Error 91 'Adapter' is not a member of 'AttendTrackerFull.WA_MMTP_TrackerDataSet1.PATIENTSTableAdapter'.
Error 92 'ClearBeforeFill' is not a member of 'AttendTrackerFull.WA_MMTP_TrackerDataSet1.PATIENTSTableAdapter'.
I guess I'm a little confused. once code is moved into the custom partial class it seems to lose any knowledge of the main class file and any references in the class. Am I doing it wrong? or is it a restriction of the .Net since it is in another
file. If its because its in another file, my next question would it be better to take the partial class I created to contain my custom code, should I just move my partial class to the bottom of the dataset.designer.vb file? But if I do this, wont it still
erase my custom code. Any suggestions?
Thanks
MichaelThanks for the reply.
They are compile time errors, but the error shows up even before compiling, so I guess it would be designer time exception also.
What I did the other day was to create a new class file (didn't add a namespace statement to class) then added the code in prev message. This morning I added a new module and added the prev code in it incased in the namespace
namespace ADO.NET.DataSet1TableAdapters statement. But I still have the same errors messages. I tried
to set the Custom tool.namespace property of the dataset to WA_MMTPDataset and then did the following in a module:
namespace WA_MMTPDataset
Module Module4
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
End Class
Partial Public Class UsersTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.UsersDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd3 As System.Data.SqlClient.SqlCommand
dd3 = new System.Data.SqlClient.SqlCommand
dd3.CommandText = Sql
dd3.Connection = OpenConnection()
Me.Adapter.SelectCommand = dd3 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
End Class
End Module
End Namespace
But I'm still getting the same errors. -
How to control or manipulate a report parameter through SSRS Custom Code
Hi,
In reporting services 2005 or 2008, is it possible to control the parameters inside the custom code of a report?
for example:
Let's say I have a parameter that displays the following value:
Red
Green
Blue
In typical scenario I can select one of the values or I can select all of the values then click the View Report button in reporting services.
I know that this approach is much easier to do if I have an external application like ASP.Net and from there I'll just add report viewer and control the parameters to be passed and then generate the report.
In the report I added text box that will serve as a hyperlink to refresh report:
In the Text Box Properties\Action tab. Is it possible to control the selection of values through a custom code(SSRS Custom Code) then the report will be automatically refreshed?
thanks,
JoeferNot sure about doing a multiple selection. But you can pop up an input box to get the input on the fly.
Add the below custom code and expression for the above parameter
Public function Getparamvalue() AS STRING
Dim x as STRING
x = InputBox("Enter Red / Blue / Green")
Return(x)
End function
=Code.Getparamvalue() -
Function MakeList(ByVal items As Object()) As String
If items Is Nothing Then
Return Nothing
END if
Dim builder As System.Text.StringBuilder =
New System.Text.StringBuilder()
builder.Append("<div>")
For Each item As Object In items
builder.Append("<div <ul>")
builder.Append(item)
builder.Append("</ul>")
Next
builder.Append("</div>")
Return builder.ToString()
End Function
Function Length(ByVal items as Object()) as Integer
If items is Nothing Then
Return 0
End If
Return items.Length
End FunctionHi Wintersbay,
According to your description, when you use the custom code in SSRS report, you got the error message.
To solve the problem, please refer to the custom code below:
Function MakeList(ByVal items As Object) As String
If items Is Nothing Then
Return Nothing
END if
Dim builder As System.Text.StringBuilder =
New System.Text.StringBuilder()
builder.Append("<div>")
For Each item As Object In items
builder.Append("<div <ul>")
builder.Append(item)
builder.Append("</ul>")
Next
builder.Append("</div>")
Return builder.ToString()
End Function
Function Length(ByVal items as Object) as Integer
If items is Nothing Then
Return 0
End If
Return items.Length
End Function
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
I am receiving this error with the following code, which counts the number of work days between two parameters and I don't see the problem. Please help.
Public Function GetDateCount(ByVal StartDate AS DateTime, ByVal EndDate AS DateTime) AS Integer
Dim TempVal AS Integer
DimTotalDays AS Integer
TotalDays = 0
TempVal = DateDiff(DateInterval.Day, StartDate, EndDate) + 1
for I as Integer = 1 to TempVal
If(StartDate.DayOfWeek.ToString() <> "Sunday" AND StartDate.DayOfWeek.ToString() <> "Saturday") Then
TotalDays = TotalDays +1
End If
StartDate = DateAdd(DateInterval.day, 1, StartDate)
Next
Return TotalDays
End FunctionHi CNet Vase,
According to your description, you want to use custom code to count the number of work days between two parameters in the report, but when you run the report, an error occurs.
I reproduced the issue in my environment, the error message: ‘DimTotalDays’ is not declared. The error is caused by there is no space between Dim and variable TotalDays, so the system regards it as a unit. To fix this issue, please type
space behind the word Dim like below:
Dim TotalDays AS Integer
If there is any misunderstanding , please feel free to let me know.
Best Regards,
Wendy Fu -
Can we call custom code in parent report, which written in the subreport
Thanks in advanceCan we call custom code in parent report, which written in the subreport??
Example :
i have written code in subreport as follows
This can call it on parent report as "code.EmbeddedFunction()"
Thanks in advance -
Hi..getting error while previewing the report..hi i have the custom code
hi my custom code is as follows:
Public Shared Function SetColor(ByVal OrderYear As datetime,ByVal LineTotal As numeric(38,6)) As String
SetColor= "Transparent"
If Productid >= 20 Then
SetColor= "Green"
End IF
End Function
i'm getting error as
"there is an error on line 0 of custom code:[BC30002] Type numeric is not defined:
i have same datatype for LineTotal in my database.
Please help.Thanks in advance..
luckyHi Lucky,
Just as the error message said, there is no such data type named numeric in Visual Basic. The data type is actually exist in
SQL Server, but it doesn’t means that it should also exist in
Visual Basic. And based on my research, I couldn’t find a strictly equivalent data type in Visual Basic.
Besides, it seems that there are something wrong in your code. For more details, please see:
There is no such variable named Productid in the code, we should define it in the SetColor function in advance. Because you it used in the condition of if statement.
We should remove the unused variable in the function. Such as OrderYear and LineTotal. If the function needs LineTotal variable, we can use double data type to define the data type of LineTotal after format it.
The following custom code is for your reference:
Public Shared Function SetColor(Productid As integer, ByVal LineTotal As Double) As String
SetColor= "Transparent"
If Productid >= 20 Then
SetColor= "Green"
End IF
End Function
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Hi,
I Haven't used Vb.net, as I work on C#, But in SSRS it supports only VB.net code as custom coding, so i coded in c# and converted to VB.net from online converter. The code i got from online converter is working fine in local i.e when i preview in BI studio,
but when i try to deploy the same i'm getting error
Error 3
There is an error on line 12 of custom code: [BC30201] Expression expected.
0 0
Below is the code:
' -- Author : Jai Anand
' -- Date : 06-05-2014
' -- Discription : To split the given string of numbers and Assign the days for it,
' -- example: if integer 1 - (Su) --> Sunday, 2 - (Mo) --> Monday
public Function FindPlanDays(plandate As String) As String
Dim planarray As String() = New String() {}
Dim days As String = ""
planarray = plandate.Split(","C)
Dim i As Integer = 0
While i < planarray.Length
Dim day As String = If(planarray(i) = "1", "Su,", If(planarray(i) = "2", "Mo,",
If(planarray(i) = "3", "Tu,", If(planarray(i) = "4", "We,", If(planarray(i) = "5", "Th,", If(planarray(i)="6","Fr,", If(planarray(i) = "7", "Sa,", String.Empty)))))))
days = days & day
i += 1
End While
days = If(days <> String.Empty, " (" + days.TrimEnd(","C) + ")", days)
Return days
End Function
Kindly check the code, if any issue is there,give me the solution..Thank youHi,
I found the solution and the report is deployed . The issue was with If and we should suffix with space and underscore( _) at the end of the line break and continues in next line (i.e if the statement continues in next line).
iif has always been available in VB, even in VB6.
Dim day As String = Iif(planarray(i) = "1", "Su,","Mon")
It is not a true operator, as such, but a function in the Microsoft.VisualBasic namespace.
so the modified code which worked fine to deploy
' -- Author : Jai Anand
' -- Date : 06-05-2014
' -- Discription : To split the given string of numbers and Assign the days for it,
' -- example: if integer 1 - (Su) --> Sunday, 2 - (Mo) --> Monday
public Function FindPlanDays(plandate As String) As String
Dim planarray As String() = New String() {}
Dim days As String = ""
planarray = plandate.Split(","C)
Dim i As Integer = 0
While i < planarray.Length
Dim day As String = Iif(planarray(i) = "1", "Su," ,Iif(planarray(i) = "2", "Mo,", _
Iif(planarray(i) = "3", "Tu,", Iif(planarray(i) = "4", "We,", Iif(planarray(i) = "5", "Th,", _
Iif(planarray(i) ="6","Fr,", Iif(planarray(i) = "7", "Sa,", String.Empty)))))))
days = days & day
i += 1
End While
days = Iif(days <> String.Empty, " (" + days.TrimEnd(","C) + ")", days)
Return days
End Function -
F-32 for one time customer code
Hi,
This is related with F-32 cusomer open item processing. It involves some of these document type....billing type RV , DA i.e. credit memo and many other. After processing open item if debit credit matches with differnce zero system easily post the clearing doc. But when there is difference system passes one document for balance amount. like if more of RV billing doc it will show receivable or vice cersa more of DA type doc it will show advance received right?
Normally System automatically post document for this differnce figure. Document type AB i.e. now my customer will have open item with AB document type till next clearing. However in case of one time customer sytem simulates the documet. Pass first line item with document type AB for differntial amount but shows error 'correct first line litem before posting. '
When i open that line item, it shows business partner data i.e. customer adress is blank and if you filled up that system allows to post.
As per my analysis when i tried to do F-32 for other than one time customer code system flows this address (If more of RV
balance then from RB Billing Type or advance received i.e. more of DA type then that corrosponding document.) But in case of one time customer code we do not maintain master and therefore systm can not find out that adress deatils and ask for it before posting docuemnt. This is as per logic and correctly understandable.
But i want to know is there any other way or config through which system can automatically pick that adress data in case of AB document type for one time customer code?
Kindly note that it happens only with one time customer code and all other customer codes are doing perfect.
Kindly share your views.
Regtards,
Aks
Edited by: Akshatavyas on Nov 24, 2011 12:04 PMHi,
Thanks for your response.
But tell me one thing even adjustment document posting (doc type AB) system consider it as second transaction?
I feel one thing strange that my users never found such problem earlier.
I told them to find out any such scenario where system posted AB document for one time customer code.
If not then being this is first time case can be accept.
Secondly if volume is less then i don't think any abap development is required.
Bcaz anywez we can manually enter those customer address data for AB document type.
Regards,
AKS -
Writing customer code in SALES ORDER MODULE using UI API.
Hi Experts,
I have a problem in writing a data in Sales Order fields...
here's the scenario
after i select the business partner code in my UI i want it to write the customer code in customer textbox of the Sales Order module.
but after i write the error appears.
error: {"Item - Can't set value on item because the item can't get focus. [66000-153]"}
Please help me in this problem.
thanks,
Edited by: Joey Bryan Dante on Aug 26, 2011 7:38 AMDim oItem As SAPbouiCOM.Item
Dim oItems As SAPbouiCOM.Items = oForm.Items
oItem = oItems.Item("3")
Dim oEdit As SAPbouiCOM.EditText
oEdit = oItem.Specific
oEdit.Value = oCardCode
this is my code.
thanks, -
Generation of custom code from oracle DB.
Hi All,
I am new to oracle BIP which is used to pull reports.I got a requirement to pull the data through BIP using java custom code.I got the API doc for BIP and statrd developing some sample code.My input to the code will be in XML which has one unique attribute and based on the attribute i will run a query to connect to the database and pull some attributes related to the unique attribute input.The output will also be in an XML.When i go through the doc i came to know that "DocumentProcessor" (not sure) is the calss which can be able to pull it data from database.I am using oracle 9i DB.If anyone has any such requirements can you please share the piece of code which helps me to understand and procced further.Here is the piece of code that is written.
DocumentProcessor docProcessor = null;
try
docProcessor = new DocumentProcessor(xmlFilePath, temporaryDirectory);
Vector outputList = docProcessor.process();
catch(IOException ioe)
// If this exception is thrown, the temporaryDirectory information is incorrect.
ioe.printStackTrace();
catch(Exception exc)
//If this exception is thrown, process() failed
exc.printStackTrace();
Can yoou please guide me what to do further or the above code is correct.
Thanks in advance.Hello Narinder,
Thanx for your advice.
As far as I understand, JAX-RPC is a specification which different vendors could implement in different ways. So WebServices generated from wscompile of Vendor A doesn't need to run in a WebServiceEngine from Vendor B.
I have downloaded the Java WebService DeveloperPack, but only Tomcat and the SUN ApplicationServers are supported. In our project, we are now focusing on the technology the SAP NetWeaverDeveloperStudio provides.
Thanx again and have a nice weekend
Mo -
Issue in OTR creation with Numeric Range of Customer Code
Dear All,
I am facing error while creating OTR with reference to Sales order in SAP TM system. The Error message “Business partner internal ID 0000710420 does not exist” appears when I Use Customer Code as Numeric, whereas if I create customer with Alpha-Numeric, then there is no issue.
I have debugged the same and found the error is in Class “/SCMTMS/CL_TRQ_ICPY_TRQ_REQSRV” under Method “PREPARE_MD”. In this method, the system is converting the Business partner Code (Field: EXT_BP_ID) of Customer to 60 Character for Numeric Customer Code. Due to which system is not getting the KEY (Field: INT_BP_KEY) of the Business partner as shown in below screenshot:
Whereas for Alphanumeric Customer Code, system is not converting the Business partner Code to 60 Char and hence not giving error. Below is the screenshot:
Kindly advice how to resolve the issue.
Regards,
Vibhu GuptaDear Marcelo,
Yes same number range is maintained in both systems and infact BP is creating in TM system. But while creating OTR, TM system is calling a functional module in method I mentioned above, which will cusion the Business partner ID to make it 60 Character internally while creating OTR, due to which system is able to fetch its Key and hence give error message.
This is happening only when Business Partner Number range is Numeric. If I use Alpha Numeric, then system do not cusion the business partner code and hence do not give error.
Regards,
Vibhu Gupta -
Blocking User from accessing wrong customer code in VA01
Hi SAP SD GURU,
my finance user uses rebate recipent in sales order creation for rebate settlement.
my operation user uses one-time customer code in sales order for sales.
Both type of customer codes can be used in sales order creation under different order type.
The problem arises when operation staff uses rebate recipent code to create sales order and then billing.
My finance User want this to stop.
How can I block the operation User from continuing the sales entry when they select the rebate recipent in a sales order entry?
Is there any available setting in the customer master that allow me to do so?
Is there any setting in the SPRO that can control this?Hi Colin,
Well you need to control these through the user profile & roles
you can do this in SU01 which a Basis person can help you out with .....
now as said User X wants authorisation to va01 ( Rebate)
User Y wants Authorisation to va01 ( One time)
since here we are not restricting any user for VA01 auth , the Basis person can define the role only till the transaction level not beyond that in standard SAP transaction and here you want to restrict user to not use different customer code
as per my knowledge i dont think that is possible but still have a check with the Basis team
Hope this helps
Cheers -
How to add Custom code in Report Painter
Hi All,
I have a requirement to add Authorization checks at Profit Center Level for 8A-PCA001G report. This is the first time am working on Report Painter/Writer. I am wondering whether i can add custom code or not. Please suggest me how to do this. I copied 8A-PCA001G into a zreport but did not find anywhere to add custom code.
Any help would be really appreciated.
Thanks,
KumarHi Kumar,
You cannot write custom code (0% coding) in an Report Writer/Painter report. The code is generated by SAP while generating the Report group. The only place in a report writer report where you can write very minimal code is at varables level or formulas inside reports.
At the report group header level, there is provision to provide authorization group. Try that.
Regards,
Subin John.
Edited by: subin john on Mar 24, 2011 10:36 AM
Maybe you are looking for
-
I bought a cd from itunes, and imported it onto my play list. It does not play on my ipod. Any help......?
-
Deleted App on my iPad 1. Tried to reinstall - but app has been updated and only works on iOS6 now. Have gone to app store and looked under "purchased", again only the updated app is available which doesn't work on my device. How do I get back the
-
Is Logical Database used in ABAP?????
Hi All, I m very confused whether LDB's are used in ABAP or not. i have undergone a small training in ABAP-HR (HCM). In that training i was told that there is an advantage in HCM that LDB's are used here which were not used in ABAP. And i have read s
-
No External Instrument Plugin in the List
Hi, I've searching for a while but can't find any info regarding the External Instrument plugin. The manual says it's supposed to be under Instruments > Logic > External but there it's not there. I'm running DTDM + DAE combination. Would that be a pr
-
Versioning / preserving deleted files
I created a CM repository with versioning turned on and the 'Preserve Version Histories' option enabled. I've tested and it seems to work; I can create a file, change it, then delete it and find all history for that file in the .system folder. Is t