Adding code to MV45AFZZ
Hey!
I am trying to add an include statement under the FORM USEREXIT_MOVE_FIELD_TO_VBAK.. This include contains all the code needed for this project. Editor mode does not allow the user to change the text within the include file. What is the best way describe this? Any ideas?
oh ok yeah I did the insert thing. How do I test this exit code? I have it calling another include, but I don't know how to test if the other include gets called correctly
Similar Messages
-
Added code for VA01 transaction ----in the include MV45AFZZ
Hi All,
I have added the code for pop-up
if the quantity is greter than 20000 then we need to give the confirm pop-up.
for that i have added code like this.
When we clik on YES it will save the order.
suppose if i clik on NO then i need to change the quantiy value.
Whats needs to be doing for this.
Please help me on this.
IF ( vbak-vkorg = 'CA01' OR vbak-vkorg = 'CA02' OR
vbak-vkorg = 'CA03' ).
IF vbak-netwr > '50000.00'. "Comparing quatity value
w_txt = 'Order Quantity exceeded 50000 CAD. Please confirm'.
w_txt1 = 'Order Quantity Check'.
MESSAGE w901(zmsg1) WITH '50,000.00 CAD'.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'Y'
textline1 = w_txt
TEXTLINE2 = ' '
titel = w_txt1
START_COLUMN = 25
START_ROW = 6
cancel_display = ' '
IMPORTING
answer = w_ans.
CASE w_ans.
WHEN 'J'. "<b>This is for COnfirm means Yes</b>
CONTINUE.
WHEN 'N'. "<b>This is for NO</b>
SET SCREEN 4008.
CALL SCREEN 4008.
LEAVE TO SCREEN 4008.
Thanks
Sriman.Hi,
I assume that you are writing this code in "<b>USEREXIT_SAVE_DOCUMENT_PREPARE</b>". If not that first thing you do is move your code here.
The next thing is modify your code like this
IF ( vbak-vkorg = 'CA01' OR vbak-vkorg = 'CA02' OR
vbak-vkorg = 'CA03' ).
DATA: lv_screenno TYPE syst-dynnr.
IF vbak-netwr > '50000.00'.
w_txt = 'Order Quantity exceeded 50000 CAD. Please confirm'.
w_txt1 = 'Order Quantity Check'.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'Y'
textline1 = w_txt
titel = w_txt1
cancel_display = ' '
IMPORTING
answer = w_ans.
CASE w_ans.
WHEN 'J'. "This is for COnfirm means Yes
WHEN 'N'. "This is for NO
* SET SCREEN 4008. "Remove this line
* LEAVE TO SCREEN 4008. "Remove this line
*" No need to define variable FCODE again,
*" it is alreay define in MV45ACOM
fcode = 'ENT1'. "sy-ucomm. Add this line
lv_screenno = sy-dynnr. "Add this line
LEAVE TO SCREEN lv_screenno. "Add this line
ENDCASE.
ENDIF.
ENDIF.
Let me know if you have any question.
Regards,
RS -
Adding code to additional fields in Ad Hoc Query
Hello,
I am trying to add code to existing additional fields available in IT0001 - Field SYHR_A_P0001_AF_PL_CTRY.
I have added code in the field code section, but the field does not get populated.
I also tried to add code to Start of selection / Record processing sections, but the values are not populated.
What am I doing wrong?
Thanks,
VaishaliHi Vaishali,,
Your question is not clear, no probs. you plz check this code !!
FUNCTION zhrintf_om_pernr_info_adhocqry .
""Local Interface:
*" IMPORTING
*" VALUE(FI_PERNR) TYPE PA0001-PERNR
*" VALUE(FI_BEGDA) TYPE PA0001-BEGDA
*" EXPORTING
*" VALUE(L_MC_STEXT) TYPE HRP1000-MC_STEXT
DATA: dep_text(40) TYPE c,
l_plans TYPE pa0001-plans,
l_sobid TYPE hrp1001-sobid,
l_mc_short TYPE hrp1000-mc_short.
Get Employee Position ID
SELECT SINGLE plans
FROM pa0001
INTO l_plans
WHERE pernr = fi_pernr
AND begda LE fi_begda
AND endda GE fi_begda.
l_sobid = l_plans.
Check if OU is Department
IF ( l_sobid NE '00000000' ) AND ( l_sobid NE '99999999' ). " Terminated Employee
WHILE NOT ( ( l_mc_short(1) EQ '2' ) OR ( l_mc_short(1) EQ '1' ) OR ( l_mc_short(1) EQ 'X' ) ).
SELECT SINGLE sobid FROM hrp1001
INTO l_sobid
WHERE objid = l_sobid
AND rsign = 'A'
AND sclas = 'O'
AND begda LE fi_begda
AND endda GE fi_begda.
SELECT SINGLE mc_short mc_stext FROM hrp1000
INTO (l_mc_short, l_mc_stext)
WHERE otype = 'O'
AND objid = l_sobid
AND begda LE fi_begda
AND endda GE fi_begda.
Empty l_mc_stext if OU is not Department
IF NOT ( ( l_mc_short(1) EQ '2' ) OR ( l_mc_short(1) EQ 'X' ) ).
l_mc_stext = ''.
ENDIF.
ENDWHILE.
ENDIF.
ENDFUNCTION.
Regards
Zulfikhar Ali -
Hi adding code in standard prog
hi
i am adding code in standard program J_1IEWT_CERT. in that there is include
J_1IEWT_CERT_F01.
there is standard prog internal table printtab.
i am trying to pass printtab data into wa_printtab, but it not going into wa_printtab.
i writing following code:
loop at PRINTTAB into itab_printtab.
move ITAB_BKTXT-BKTXT to itab_PRINTTAB-cheque_no.
modify printtab from itab_printtab index 1.
endloop.
first data is not going into itab_printtab by loop syntax and it is not modifying as well.
pl help me as soon as possible.
thanx
rockyHi,
try this its working for me.
REPORT ZKEERTHITEST.
tables: mara.
DATA: BEGIN OF IT_MARA occurs 0,
MATNR TYPE MARA-MATNR,
ERSDA TYPE MARA-ERSDA,
ERNAM TYPE MARA-ERNAM,
MTART TYPE MARA-MTART,
END OF IT_MARA.
data: wa_mara like line of it_mara.
select matnr ersda ernam into corresponding
fields of table it_mara up to 5 rows from mara.
loop at it_mara into wa_mara.
wa_mara-mtart = 'FERT'.
modify it_mara from wa_mara index 1.
endloop.
regards,
keerthi -
Adding code-coloring to file with nonstandard extension
I have PHP files that end in .ctp, which are basically HTML templates with PHP mixed in (as part of the Cake PHP framework). I'd like them to be parsed for code coloring the same way that the PHP files are, but the text is all black. Is there a way that I can tell Dreamweaver to parse it for PHP code coloring? I have already added ".ctp" to the list of file types that open in Code View using DW's Preferences.
This is CS4.
Thanks!Nevermind - I figured it out from here, you just have to edit an XML file to include the new extension that should be treated as PHP:
http://kb2.adobe.com/cps/164/tn_16410.html -
*Added* code to existing source file, compiled it, and class file shrunk
Another newbie here. Fortunately, my classpath is ok, so I'm able to compile a .java file.
I added one line of code (System.out.println) to write the value of a variable to a log. After compiling with javac, I noticed that the resulting [new] class file was smaller than the existing class file. I looked at each of the class files with Textpad. It's gibberish, but I quickly saw that a large block of code was missing in the new class file, even though the size of the source file had been increased.
There is a difference, however, between how the two class files were created. The existing class file was compiled (along with many others) by exporting an .EAR file from a development environment (WSAD) to the WebSphere Administrator Console. Conversely, I am now compiling the same source file with javac on my machine.
I suspect that this is the reason why I can add code to a .java file, compile it, and have the resulting class file actually lose code. Even if I am correct, I don't know what to do about it.
Does anyone have an idea?
Regards,
Daniel T.Thank you both for your replies. I've read many posts over the past few months, and I know how important it is to provide as much info as possible, when asking a question here. That said, I have another tasty tidbit...
After replacing the existing (larger) class file with the new (smaller) class file, my application now produces this:
"*Error 500: LinkageError while defining class*..." [name of class]
*"...(Unsupported major.minor version 50.0) This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader@6bd156d5 Local ClassPath:"*
...[the entire classpath]...
Original exception--- java.lang.UnsupportedClassVersionError:
I'm guessing that my focus should mostly be on the 'Original exception', and maybe I need to revisit the JRE or JDK or JVM (these terms are somewhat nebulous to me, so please forgive me using them interchangeably) on my machine. For now, I'll just keep trying stuff. Thanks again for the replies!
Regards,
Daniel T. -
Adding code in ABAP Query(ABAP HR)
I have created an ABAP Query for getting the Absence details of employee within a specified period.I am populating the fields
Employee number, Organization Unit,Absence start date,Absence hours, Absence enddate.
If an employee is in leave for 10 days, this information will be stored in PA2001 table,and this table is not Organization specific.
During the specified period(20 days), if an employee is under two Organization units(5 days in 1st Org Unit,15 days in 2nd Org Unit). The query is extracting two records for the same employee, because of two Organization units. And while populating the data, the query is getting the Absence information from PA2001 table, and this is causing overlapping of data. So it is showing the Absence details for that employee as 40 days(20 days in 1st Org Unit and 20 days in 2nd Org Unit,Instead of total 20 days). So i would like to add validation over here after extraction of data from the PA2001 table,before displaying the data.
I have tried adding the code in the infoset, at END OF SELECTION Event,but i am not able to change the list, as i am not able to access the tables used by the Query.
Can anybody suggest me where to add the code in the Query, so that i will be able to solve this issue, instead of changing the code in the Report program generated by the Query.you can look at BAPI_PTIMEOVERVIEW_GET
this gives the output back for the selected period so you don't get alle the records back from you're pa2001 table. (only this overview doesn't take into considerationd the distiction the difference between leave and illness)
further on if you consider using the pa2001 table you can loop through the begda and endda and add 1 day for each record and programm the logic how you want to intrepet each day you'reself
I use the data from perws which comes from the function HR_PERSONAL_WORK_SCHEDULE
(which is also used in the BAPI mentioned above)
and from PA0001 you can retrieve how long somebody was in 1 org unit !!
LOOP AT it_2001 WHERE begda BETWEEN i_begda AND i_endda
OR endda BETWEEN i_begda AND i_endda.
h_datum = it_2001-begda.
IF it_2001-awart BETWEEN '0100' AND '0199'.
WHILE h_datum <= it_2001-endda.
READ TABLE it_perws WITH KEY datum = h_datum.
IF sy-subrc = 0.
* you're logic
ENDIF.
CALL FUNCTION 'FKK_DTE_ADD'
EXPORTING
i_base_date = h_datum
i_periode = 'D'
i_period_factor = 1
* I_USE_FACCAL = ' '
* I_WORKDAY_INDICATOR = '-'
IMPORTING
e_datum = h_datum
* EXCEPTIONS
* ERROR_OCCURED = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDWHILE.
kind regards
arthur de smidt
Edited by: A. de Smidt on Jul 16, 2008 8:47 AM -
Is it possible to add code to iWeb templates? Using iWeb version 1.1.2.
Thanks in advance.
RoyI then put it back into the folder on my iDisk.
I don't understand what you mean by that. If you open something on your idisk, edit, and save, there is nothing to "put back". It never went anywhere.
Did you do this on the local copy of your idisk? In that case it might not have synched with the real one on .Mac.
I then opened it in my browser (Firefox), and it looked exactly the same as before. I selected view page source to see if it had been erased and the added .html was still there.
If you added html and open the page with your browser and there was no change, there could be two reasons: the html you added was not correct in terms of making the change you wanted, or your browser was looking at the old version of the page from its cache. The latter is very common with Safari and can be fixed by doing Safari > Empty Cache.
If you want to provide the url of the page you have changed with some info about what is not showing up, I'd be happy to have a look. -
Error while adding code inside validateEntity()
Hi,
Requirement is there is a custom table on custom OA Page which is updatable. If we change any value in the table the process_flag attribute should be changed from E to N.
I tried putting code in EOImpl validateEntity()
protected void validateEntity()
super.validateEntity();
Number trxId = (Number)getTransactionId();
setProcessFlag("N");
System.out.println(" Row Modified for trx "+trxId+" "+valDated);
I am getting error
oracle.jbo.ValidationException: JBO-28200: Validation threshold limit reached. Invalid Entities still in cache
If i comment setProcessFlag it is successfully printing trxId whcih records was changed.
If we are not supposed to set Entity Attribute value in validateEntity() what is the best way to achive this ?
Thanks,
AbhiHi Pradeep,
I tried putting setProcessFlag("N");
method inside create method of EOImpl. It is not working.
I tried vo.isDirty() that is also not picking from AM.
Requirement is to identify row if any column changed if yes Change flag.
Thanks,
Abhi -
Action script 3 and adding code to buttons
When I open a new doc and selct action script 3 it won't
allow me to insert code by selcting the button on the stage. It
does if I select action script 2. All my old pages update ok but if
I make new buttons it wont take the code. CAn someone tell me what
is going on???
Thanks a lotIf your in a bind at the moment, I would suggest not
attempting to learn AS3. The system is very different, good, but
different, the syntax structure is much more strict and most things
have been revised to use a listener/broadcaster (or event
dispatcher) model, as well as most coding being class oriented,
additionally the graphic display structure is quite different.
Now did you change your publish settings back to AS2? If so,
you should still be able to apply the above code to a button
instance. However, as Dave stated, even in AS2 the code is best
used from the timeline, to do so with the code above (which the on
handler above is meant for Object attachment) you need to write it
like this:
my_btn.onPress = function() {
_root.loadMovie("graphic_arts/graphic_arts.swf");
I would also consider using a MovieClipLoader and the
loadClip method forloading swf files, as it gives you more control
over the load targeting, progress reporting, and event
notifications.
All this said, to use a button and load a file in AS3, you
need to add an event listener to the button instance and construct
a responding function to the event, in this case the loading of a
swf file. Additionally, in AS3 the MovieClipLoader class, as well
as the loadMovie methods have been replaced by the Loader classes
and must be used to load swf files. So construct a button in AS3
you must write something like the following: -
Hi,
Can any one tell me the way in which i can write some code in the abap query? I need to create one internal table which will bring data from different tables based on some coditions. For all entries in this internal table, I should get data from some other group of tables into second internal table.
At the end, I need to display only some required fields from the second internal table.
It would be helpful if anyone can give me the way in which we can do that with some example.
Thanks in advance.
Regards,
Raja sekharSELECT BUKRS BELNR GJAHR BUDAT BLDAT
FROM BSIS
INTO CORRESPONDING FIELDS OF TABLE I_BSIS
FOR ALL ENTRIES IN I_BKPF
WHERE BELNR = I_BKPF-BELNR
AND BUKRS = I_BKPF-BUKRS
AND GJAHR = I_BKPF-GJAHR
AND BUKRS IN S_BUKRS
AND BUDAT IN S_BUDAT
AND ( MWSKZ BETWEEN 'A0' AND 'F9'
OR MWSKZ = '' ).
SORT I_BSIS BY BELNR.
DELETE ADJACENT DUPLICATES FROM I_BSIS.
IF I_BSIS[] IS NOT INITIAL.
SELECT BUKRS BELNR GJAHR VBELN
FROM BSEG
INTO CORRESPONDING FIELDS OF TABLE I_BSEG
FOR ALL ENTRIES IN I_BSIS
WHERE BELNR = I_BSIS-BELNR
AND GJAHR = I_BSIS-GJAHR
AND BUKRS = I_BSIS-BUKRS
AND BUZEI = '001'
AND VBELN <> ''.
ENDIF.
LOOP AT I_BSEG.
CLEAR : I_GL, I_SAKN1.
REFRESH : I_GL, I_SAKN1.
SELECT HKONT
INTO CORRESPONDING FIELDS OF TABLE I_GL
FROM BSEG
WHERE BELNR = I_BSEG-BELNR
AND BUKRS = I_BSEG-BUKRS
AND GJAHR = I_BSEG-GJAHR
AND KOART = 'S'.
IF NOT I_GL[] IS INITIAL.
SELECT SAKN1
INTO CORRESPONDING FIELDS OF TABLE I_SAKN1
FROM C501
FOR ALL ENTRIES IN I_GL
WHERE SAKN1 = I_GL-HKONT.
IF SY-SUBRC <> 0.
DELETE I_BSEG INDEX SY-TABIX.
ENDIF.
ELSE.
DELETE I_BSEG INDEX SY-TABIX.
ENDIF.
ENDLOOP.
SELECT * FROM VBRP
INTO CORRESPONDING FIELDS OF TABLE I_VBRP
FOR ALL ENTRIES IN I_BSEG
WHERE VBELN = I_BSEG-VBELN.
LOOP AT I_BSIS.
LOOP AT I_BSEG WHERE BELNR = I_BSIS-BELNR
AND BUKRS = I_BSIS-BUKRS
AND GJAHR = I_BSIS-GJAHR.
LOOP AT I_VBRP WHERE VBELN = I_BSEG-VBELN.
I_MAIN-BUKRS = I_BSIS-BUKRS.
I_MAIN-BELNR = I_BSIS-BELNR.
I_MAIN-GJAHR = I_BSIS-GJAHR.
I_MAIN-BUDAT = I_BSIS-BUDAT.
I_MAIN-BLDAT = I_BSIS-BLDAT.
I_MAIN-VBELN = I_BSEG-VBELN.
I_MAIN-SPART = I_VBRP-SPART.
I_MAIN-POSNR = I_VBRP-POSNR.
I_MAIN-MATNR = I_VBRP-MATNR.
I_MAIN-WERKS = I_VBRP-WERKS.
I_MAIN-FKIMG = I_VBRP-FKIMG.
I_MAIN-VRKME = I_VBRP-VRKME.
I_MAIN-MWSBP = I_VBRP-MWSBP.
I_MAIN-NETWR = I_VBRP-NETWR.
APPEND I_MAIN.
ENDLOOP.
ENDLOOP.
ENDLOOP.
fill ur required fields in Main internal table using this type of loop.
regards,
shardul shah -
Contribute Adding Code, somehow
I developed a site for a client that uses Adobe Contribute to update their site:
I created a Dreamweaver template and created editable regions.
The issue is:
When the client updates pages in Adobe Contribute, somehow the below .html code gets inserted outside of the editable regions and disrupts the page layout-
<p style="margin-top: 0; margin-bottom: 0;"> </p>
No where in my Dreamweaver template is the code:
<p style="margin-top: 0; margin-bottom: 0;"> </p>
This code only shows up after the client has edited a page and puts it up to the server.
Any suggestions on what might be causing this?
Thanks!and if you want to look at the source code at this page:
http://ngprs.com/history.html
You will see the below code that was auto inserting when my client updated
the page in Contribute... Thanks!
</p -
Adding code to aid in responding to submitted forms
I would like to add a line of code to my existing forms (.asp) so when I reply to the message by email the "to" line of the reply message is automatically poplulated by the email address entered in the form.
Here is the email portion of the code
With objMessage
.To = "cpfcu <[email protected]>"
.From = "Webform <[email protected]>"
.Subject = "Contact Inquiry"
.TextBody = "Name: " & VBNewline & name & VBNewline & VBNewline & _
"Phone: " & VBNewline & phone & VBNewline& VBNewline & _
"Email: " & VBNewline & email & VBNewline & VBNewline &_
"Address: " & VBNewline & address & VBNewline & VBNewline & _
"Message: " & VBNewline & message & VBNewline & VBNewline & _
"Sent: " & VBNewline & Now() & VBNewline & VBNewline & _
"From: " & VBNewline & IP
.Send
End With
So with this code, what happens is when I reply to the message it goes to Webform at my own address. It just seems to me there should be some little snippet that would instruct the form to populate the To field with the information entered in the email field. -
hi furus,
i want to add codeing in step6 that is
display field mapping in conversion rules in LSMW
i need to add new lines to the existing source code can any one please tell me how to do this?
thanks in advanceHi,
in line 'Maintain Field Mapping and Conversion Rules' you make usually your field assignments. Here also button 'Rule' (CTRL+F4) is available. Choose in following radio-button list 'Abap Code' and a window will popup up.
Add your tests, save and go on with normal LSMW processing.
reward if it helps..
Regards,
Omkar. -
Adding code in std. user exist
Hi,
I want to add some code in USER EXIST,
the include program : RV60BFZA , is a include program which is use in Function Pool program SAPLV60B
now in RV60BFZA there are many usereixt and in user exist
FORM userexit_fill_xkomk1.
ENDFORM. "USEREXIT_FILL_XKOMK1
I want to add code rule_new_cancel = 'A'.
will you please giude how to add this code in the user exist, I have never work on uer exist.
regards,
zafar
Moderator Message: These are NOT training forums. Nor are they an alternative for proper classroom trianing.
Edited by: kishan P on Dec 6, 2010 1:52 PMHi Ashok,
Thanks for your reply,
I follow the stpes given by you when I click on create enhancement it is giving a pop up box for selection of DECLARATION or Code then I click on code then again it is displaying on epop for the selection of enhancement implementation and Pack, now there are many pack in this, so what to select and proceed, what is effect of this.
regards,
zafar
Maybe you are looking for
-
How to get rid of samba reference in network drive list
My server died (NOWS); battery on ups failed; that is all fixed now; When I first booted it, none of us could log on (I should have just waited a while); I went to Remote Manager and noticed a lot of things not running and loaded them all. We all log
-
Can't sync to more than one library at a time
I have deauthorised my desktop running XP,installed latest version of iTunes on laptop running Vista and authorised. Connected iPod to laptop and tried to sync but keep getting message that "iPod is already synced to a library and cannot be synced to
-
Hi Folks, I have scenario like below in example, let me know how to approach this, i have open purchase order in legacy as 10kg in line item 1. Out of this 6 kg, is GR in legacy. Open qty is 4kg. Now during migration of my purchase order from legacy
-
Hi Guys, I had a error in MONI for File to IDOc scenarion like"White spaces are required between publicId and systemId." Can you please give the solution. thanks
-
JavaScript Async Method call on the OnChange event of a lookup
Hello, I try to fill dynamically a lookup-multi field by selecting a value in a dropdownlist based on a lookup field. I recreated the onchange event of my dropdowlist by using this code : lookupElement.onchange = function () { OnFormationChanged() };