In Badi -- In Methods --- Parameters
Hi All,
I have badi in Header there is a method and having parameters
I_MKPF TYPE MKPF
HEAD TYPE J_3RM4_HEAD
J_3RM4_HEAD structure contains these fields
MBLNR
OKPO
NOTICE
BUKRS
BUDAT
LAND1
CC_NAME
SUBDIV
BWART
LGORT
LGOBE
MBLNR
NOTICE
BUKRS
SUP_NUM
SUPPLIER
INSUR_COMP
COR_ACCOUNT
ANAL_CODE
ACCOMP_DOC
PAYM_DOC
QUANT
UNIT
P_VAL
NETWR
VAT
DMBTR
WAERS
REC_POS
QUANT
UNIT
P_VAL
NETWR
VAT
DMBTR
WAERS
REC_POS
RECEIVER
DEL_POS
DELIVER
USER_NAME
and my requirement is to replace the Correspondig account numberwith the alternative numberSKB1-ALTKT AND THE Logic which he described in the FS is
First get the account HKONTH Via 'FI_STANDARD_ACCOUNT_DETERMINE' Function Module.
Select SKB1-ALTKT WHERE BUKRS EQ MSEG-BUKRS
and SAKNR EQ HKONTH.
IN SELECT Query The parmaeters which they have mentioned in the Method is not available can tell me how to pass the parameters?
Regards,
Venkat
ll
Similar Messages
-
Regarding BADI INVOICE_UPDATE, method CHANGE_AT_SAVE
Hi there,
I'm implementing this Badi so i can make some checks at the time of saving an edited preliminary (parked) document. If the total of the invoice is higher than the old one, i do the checks (against a Z table, a Z function module, etc) and if i have to stop saving, i trigger an error message raising ERROR_WITH_MESSAGE exception. As the only method that gets called in all the cases I need, and allows me to trigger messages, is CHANGE_AT_SAVE, I use this one.
The okcodes that i'm interested in are:
<i>PARK (Save parked document)
COMP (Save as completed)
BU (Post)</i>
The problem is, to do all the processing, i compare the method parameters
S_RBKP_OLD vs. S_RBKP_NEW.
When the okcode is PARK or COMP it's ok, but <b>when posting (BU) the S_RBKP_OLD doesn't get populated</b>! Anyone knows why is that and what the workaround would be?
Update: i've searched throught OSS but there's no note related to this.
Thank you very much.Hi Narendran, thanks for your help,
But my problem is that i need to compare the new total of the invoice (s_rbkp_new-rmwwr) versus the old one (s_rbkp_old-rmwwr), so that if the new one is higher, i check that the difference between them is not higher than a set limit, otherwise i must stop saving/posting.
I could retrieve the values from RBKP table itself (which should still be the "old" ones at the time the BADI executes) but then, what is s_rbkp_old for?
Edit: Requirements changed and now i need to do the checks for every changed line of the invoice. As in the original problem, when posting, TI_RSEG_NEW has all the new values but TI_RSEG_OLD is initial. I've been debugging a little and got to the MRM_DOCUMENT_CHANGE_PREPARE function, which is not calling the MRM_*_READ functions since i_xupda (update flag) is 'I' when posting, although no new line has been inserted.
PLEASE, if you implemented this BADi method before, post your comments or example code. Documentation is scarce and on the internet there isn't much info neither.
I've been also looking at exits but they don't seem to serve this purpose.
By the way, i'm on 4.6C.
Many thanks -
Badi BBP_SC_TRANSFER_BE, method GROUP_PO
Hi All,
We are on SRM 5.0 SP07.
I want to add an additional grouping criteria for grouping backend PO's- <b>Shopping cart Line item currency</b>.
In addition to the standard grouping (which is as per the PO header fields like vendor, purchase org, purchase group, company code etc.), I want to add line item currency as one more grouping criteria.
Can someone suggest how I can do it using BADI BBP_SC_TRANSFER_BE, method GROUP_PO?
Sample code might be very useful.
Thanks,
SrivatsanHi
Custom fields addition, go through the OSS Notes
672960 and 458591.
<b>To see the sample code, please go through the SAP OSS Notes, which is recommended here -></b>
Note 610332 BADI BBP_SC_TRANSFER_BE/BBP_RESERVATION_GRP: Customer fields
Note 1040082 BADI BBP_BS_GROUP_BE: Parameter is_object not filled
Note 980017 Follow-on document not created
Note 715213 Interface change in BAdIs in Release SRM 4.0
Note 912873 Item not filled when using PO number range BADI
Note 820404 BADI BBP_SC_TRANSFER_BE not called correctly
Do let me know.
Regards
- Atul -
Automatic output of method parameters
Hi,
Sometimes I find myself System.out'ing all parameters of a method. Is there a one-step way to do this? A one-liner that will output all method parameters (using reflection I guess) of the method the code is running in.
for e.g
public Car makeCar(Color carColor, int noOfWheels){
System.out.println(outputAllParametersOfThisMethod();
}Console:
carColor=Blue
noOfWheels=4
Appreciate any help that I can get!Hi,
You can map these all parameters in Process instruction sheets and operator can view the PI sheet to view the process or qc parameter.
Find below the link
[http://help.sap.com/saphelp_47x200/helpdata/en/05/603bc6462311d182b50000e829fbfe/frameset.htm]
http://help.sap.com/saphelp_47x200/helpdata/en/05/603bc6462311d182b50000e829fbfe/frameset.htm
Sanjay -
Netbeans 6.0 - code completion of method parameters
I just updated to NetBeans 6.0 and I find the code completion of method parameters very annoying and counter productive.
It inserts the parameters as keywords when choosing a method from the list after pressing CTRL+SPACE.
How can I switch this off?
I searched the options and also the forum but didn't find a solution.I know that pressing space or whatever replaces the selected parameter. For a method with a single parameter is not a big problem but this is a poor workaround if a method has more parameters, like eg
public static String formatDate(Date myDate, String myFormat)
When typing
Str.form<CTRL+SPACE,choose method, ENTER>
it looks like
Str.formatDate(myDate, errorMessage)
Although myDate is selected and I can overwrite it, I have to proceed to the next parameter with CTRL+M instead of simply typing a comma. This is very annoying if a method has more parameters and as this annoyance occurs approx. every 5 lines that accumulates. -
Get method parameters at runtime?
Hey guys,
is there a way to get the parameters of a methods parameters at runtime? I have a reference to an object and would like to know which paranmeter does a method have.?
thxHello
You can use class CL_OO_CLASS (instance attribute METHOD_PARAMETERS ).
Regards
Uwe -
Access fo Method parameters to Anonymous Class ?
Can somebody please provide some more information on the statement below? I am also searching for some sample code implementations of it. It would help the cause better.
+"Methods of the object of the anonymous class need access to final local variables and method parameters belonging to the method in which the anonymous class is defined. "+
Thanks in AdvanceWe're concerned here with "local" classes, i.e. classes defined inside methods (not all anonymous classes are local, and not all local classes are anonymous).
The thing about local classes is that, unlike local variables etc., instances of a local class may survive the method returning. For example a local class might be a listener which gets added to a swing component, it could be a Runnable that get's launched as a thread.
Local classes get to access local variables and parameters of the method in which they are declared but the variables or parameters have to be declared final because, since the class needs to be able to access the value of the local variable even after the method exits, and the variable ceases to exist, what actually happens it that the value of the variable is copied into a special field of the anonymous class, and if the variable could be changed after the class was defined, the two copies would then disagree. -
Here_I_Am packet w/bad fwd method L2 received indirectly via SM1/0
new to these devices and followed the quick setup guide. having a problem;
this is a 2921 router wirh a sm-sre-710 module
basic config;
on the sm-sre-710;
wccp tcp-promiscuous service-pair 61 62
on the router router;
ip wccp 61
ip wccp 62
interface GigabitEthernet0/0
ip address 10.1.1.1 255.255.255.0
ip wccp 61 redirect in
interface GigabitEthernet0/2
ip address 10.2.2.1 255.255.255.0
ip wccp 62 redirect in
interface SM1/0
ip unnumbered GigabitEthernet0/0
service-module ip address 10.1.1.100 255.255.255.0
service-module ip default-gateway 10.1.1.1
and I get this in debug messages;
WCCP-EVNT:D62: Here_I_Am packet from 10.1.1.100 with incompatible capabilites
Oct 16 17:38:28.139: WCCP-PKT:D62: Sending I_See_You packet to 10.1.1.100 w/ rcv_id 0000001Bug al
Oct 16 17:38:30.147: WCCP-EVNT:D61: updating wc orig assign info
Oct 16 17:38:30.147: WCCP-EVNT:D61: reuse wc orig mask info (28 bytes)
Oct 16 17:38:30.147: WCCP-EVNT:D61: Here_I_Am packet from 10.1.1.100 w/bad fwd method L2, received indirectly via SM1/0I found on google the following sample; ( they are using WCCP GRE as redirect method which is the one I suggest for your router please look at this sample IP addressig configuration and how he uses the Rediret In statements and on which interfaces)
http://2and2is5.wordpress.com/2011/03/30/configuring-cisco-waas-on-a-sre/
hope that helps! -
Hello
I'm usimg this code to get the local variables in case of a method entry:
error = jvmti->GetLocalVariableTable(method, &entryCount, &localVariableEntry);
if(error == JVMTI_ERROR_NONE) {
jvmtiLocalVariableEntry* entry = localVariableEntry;
for(int i = 0; i < entryCount; i++, entry++) {
cout << entry->signature << ":" << entry->name << endl;
jvmti->Deallocate(reinterpret_cast<unsigned char*>(entry->signature));
jvmti->Deallocate(reinterpret_cast<unsigned char*>(entry->name));
jvmti->Deallocate(reinterpret_cast<unsigned char*>(entry->generic_signature));
} // for
jvmti->Deallocate(reinterpret_cast<unsigned char*>(localVariableEntry));
} else if(error = JVMTI_ERROR_ABSENT_INFORMATION) {
cout << "<NO LOCAL VARIABLE INFORMATION AVAILABLE>" << endl;
} else {
cout << "<ERROR>" << endl;
} // if...else if...elseNow I'm wondering how to find the method parameters in all this local variables...
Is there a way to get obly the method parameters?
Thank you very much and with kind regards
Alexander Schell
Edited by: EJP on 3/10/2011 20:24: added {noformat}{noformat} tags: please use them.
Edit: Moved the first code-tag
Edited by: user3948319 on 03.10.2011 08:02Hello and thanks for the answer...
That was my first assumption...but after running the code I got some puzzling results...here's an example:
callbackMethodEntry: methodName=reverse methodSignature=(Ljava/util/List;)V methodGenerigPtr=(Ljava/util/List<*>;)V classSignature=Ljava/util/Collections; thread=DestroyJavaVM
I:i
I:mid
I:j
Ljava/lang/Object;:tmp
I:i
I:mid
Ljava/util/ListIterator;:fwd
Ljava/util/ListIterator;:rev
Ljava/util/List;:list
I:size
The method entered takes surely one argument - a list...but the list is not the first entry in the array which is created by calling getLocalVariableTable...so I'm a wee bit confused right now...
I also don't understand under which circumstances the JVMTI_ERROR_ABSENT_INFORMATION error is raised...
before I forget: Thanks for the tip with the code tags...I looked for something to mark the code but could not find it...
With kind regards
Alexander Schell -
How to get names of method parameters ?
How to get names of method parameters (Not only their type and value) is it only possible during debugging ??
for example void myFunction(int a,int b)
I need the "a" , and the "b" The issiue is about the java.lang.reflect.InvocationHandler ,
and its method invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
I Have the parameter objects themself and their types using method.getParameters() , this is fine ,, but i need the names of the parameters !!!If the class file was compiled without debug information included then it is impossible to get the original parameter names, as used in the source code.
However, If the class file does include debug information, then the method names are hidden deep within the class file. You'd need to parse the class file yourself. Check out a copy of the Java VM Specification for a detailed format of the java class file format.
It's not a trivial task to parse the java class file, and the VM spec isn't easy reading. You'd nearly be writing a class file disassembler. -
Hello
I am new to Java development and as I used to work with MS.NET usually rely on parameter names, so that I don't have to read documentations each time I use a method. However I noticed that WLW replaces the names of method parameters with arg0, arg1, arg2 etc. Is there a way to somehow make WLW display the real argument names and not those argX strings?
Thanks in advance.
Best regards,
Vasil SvetoslavovIn wlw select...
Tools
+-- IDE Properties
--Editor
Ensure that the following are Checked
Use Method Completion
Use Parameter Completion -
I've discovered I don't understand final method parameters as I thought I did. The language spec says you can declare a parameter as final, which I would have thought meant the method can't change it. But it turns out the called method can change it. In the following code, the change() method modifies the Test parameter quite easily.
What am I misunderstanding here? If final doesn't keep the parameter from being modified, what does it do?
public class Test
private int privateValue = 0;
* Stores the private value.
* @param privateValue The value to store.
public void setPrivateValue(int value)
privateValue = value;
public static void change(final Test test)
test.setPrivateValue(3);
test.setPrivateValue(4);
* Program entry point
* @param args Command line arguments
public static void main(String[] args)
Test test = new Test();
Test.change(test);
System.out.println("Done");
}"Ahh, I see," said the blind carpenter, as he picked up his hammer and
saw. I was indeed misunderstanding the use of final. It doesn't protect the
reference object from changes, only the reference variable itself. Sigh...Just to be sure, is this your way of saying "I don't understand those explanations"?
Look closely now :-)
public class Test
private int privateValue = 0;
public void setPrivateValue(int value)
privateValue = value;
public static void change(final Test test)
test.setPrivateValue(3); //this line does not even attempt to change the variable's value
test.setPrivateValue(4); //neither does this one
//incidentally and irrelevantly, they do ultimately change the value of another variable; a private field of the object pointed to by "test"
//the next line DOES attempt to change the variable's value
test = new Test(); //this does not compile because test is declared final
test = null; //and again!
public static void main(String[] args)
Test test = new Test();
Test.change(test);
System.out.println("Done");
}Variables (and parameters) hold primitives or references (they do not hold objects). For reference variables, they are either null or they point to an object. "final" applies to variables, not to the objects they may point to.
If final
doesn't keep the parameter from being modified, what
does it do?So (I hope) you see, it does just that, generate a compile time error when the parameter is being modified.
What am I misunderstanding here?I don't know. That's exactly what everyone else said. -
Web dynporo run-time methods parameters
Hi,
What is the best way of finding web dynpro run time method parameters ? I'm talking about methods like get_selected_parameters(), get_child_node etc..
Many thanksHi
You can use the Web Dynpro Wizard this will give you the required coding
or
go to attributes of the view
the context in the VIEW is of type IF_WD_CONTEXT_NODE. double click on this class you can find all the methods from there you can go to the parameter list
for that matter if you know a class the same can be done
Hope this will serve your purpose.
Regards
Ramchander Rao.K -
Placing commas inside method parameters with Doclet API
I wrote a custom Doclet using the [Doclet API|http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/doclet/index.html ] (located in the JDK's tools.jar).
The purpose for the Doclet is to load Java source files and create stubs (which are identical Java source files).
Here's my Docklet:
public class MyDoclet {
private static String DEST_DIR = "./destination/";
private static String TAB = "\t";
public static boolean start(RootDoc root) {
ClassDoc[] classes = root.classes();
// Parse through class or interface
for (ClassDoc clazz : classes) {
// Print Methods
MethodDoc[] methods = clazz.methods();
for (MethodDoc method : methods) {
Parameter[] parameters = method.parameters();
println();
print(TAB + method.modifiers() + " " + method.returnType().simpleTypeName() + " " + method.name());
print("(");
for (Parameter parameter : parameters) {
p.print(parameter.type().simpleTypeName() + " " + parameter.name());
print(")");
println(" {");
println("\n");
println(TAB + "}");
return stub(root);
}When I run this doclet, it generates the correct code but for methods which have multiple parameters, I can't seem to figure out how to place a comma, after each variable...
For example, if this was the target class:
public class Inventory {
public double adjustTax(int newCoffee, double SALES_TAX) {
// Implementation
}My parsed code looks like this:
public class Inventory {
public double adjustTax(int newCoffeedouble SALES_TAX) {
// Implementation
}Does anyone have a suggestion on how I can calculate or accurately place commas in between the method parameters?
Thank you,
MikeAlready found the solution...
-
Revision: 3151
Author: [email protected]
Date: 2008-09-08 21:30:07 -0700 (Mon, 08 Sep 2008)
Log Message:
Fix for bug SDK-16761 - Method parameters missing from generated document
Bugs: SDK-16761
QA: Yes
Doc:
Tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16761
http://bugs.adobe.com/jira/browse/SDK-16761
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja vaHi,
Can you try putting the declaration of the URLLoader instance
outside your fetchISSN function and see?
That is:
var loader;
function fetchISSN(myform) {
//your code above this line
loader = new URLLoader();
//rest of your code
Maybe you are looking for
-
Slow Video playback on external monitor
I'm having a problem with video on an external monitor drifting out of sync. The video plays back slow on the monitor but the sound come through fine and the video is playing at a normal speed in FCP. This is only happening with video from FCP, I can
-
Printing discs problem in My Image Garden
Hello thank you for taking the time to read this As of today when trying to print to disc in My Image Garden I am getting the following message "Cannot print because a printer supported by this software is not installed" Its a bit of a puzzler as I h
-
Duplication of fields headings...
Hi All I have three fields from different tables (mara-lvorm, marc-lvorm, mard-lvorm), they displaying fine on the alv grid but when i export the data to excel the column headings are duplicated. What can i do to solve this problem beacuse i have cre
-
Hello All I have IT210 which pops up if i do any Action but when new record is created its not delimiting, Time Constraint for this infotype is 2. In previous threads i can see Operation LIS9, will that be good option or any other way out? Thanks A.
-
Exports with Oracle Database Vault
Hi! I've running a Database in version 10.2.0.4 and it has installed Oracle Database Vault, wich is running quite well... I'm trying to export a schema that is protected with a REALM and only the owner of that schema has permision to access the data.