Rounding to nearest decimals--VERY URGENT
Hi all,
I am encountering a serious production issue. On the FB60 screen when I enter the amounts in the line items and select the the respective tax code, my system calculates the tax amount as $0.06 where as when I calculate on my calculator it is coming up as 0.0565. Because of this my total balance is offsetting by 1 cent ($0.01). I want my SAP system also to round off to $0.0565 instead of $0.06. Is there any way to do this setting. I know I can change the value manually under tax tab. But, there are so many invoices like this and calculating the tax manually and then entering the right decimal value in the tax tab will not serve my purpose.
PLease help me with this as it is a very urgent issue.
I would surely award points for any kind of positive help.
Thank you,
SONY
Hi,
As far as my knowledge goes SAP bydefault rounds off to 2 digits. If you want any changes in that you will have to take the help of ABAPer and write the routine to change the number of decimal points.
Regards
Santosh Hegde
Similar Messages
-
Hi all programmers,
I am a FICO functional consultant. I have got an issue that I think and was told that it can be solved by an ABAPer. The issue is described below:
"I am encountering a serious production issue. On the FB60 screen when I enter the amounts in the line items and select the the respective tax code, my system calculates the tax amount as $0.06 where as when I calculate on my calculator it is coming up as 0.0565. Because of this my total balance is offsetting by 1 cent ($0.01). I want my SAP system also to round off to $0.0565 instead of $0.06. Is there any way to do this setting. I know I can change the value manually under tax tab. But, there are so many invoices like this and calculating the tax manually and then entering the right decimal value in the tax tab will not serve my purpose."
Being a functional person and with no ABAPer's support, I request you guys to please help me from scratch (inclusing which t.code to use) on solving this issue by changing or creating a programming routine.
<b><REMOVED BY MODERATOR></b>
Thank you,
SONY
Title and Message were edited by:
Alvaro Tejada GalindoHi,
Please try this to create program routine.
DATA: N1 TYPE P DECIMALS 4 VALUE '0.0565',
N2 TYPE P DECIMALS 2.
MOVE N1 TO N2.
WRITE: N2.
Regards,
Ferry Lianto -
Excise Rounding--- Very Very Urgent
Hi,
In rounding OFF of Basic Excise Duty, Educational Cess & Higher S cess, the ystem is rounding to nearest rupee.
Suppose BED is 23.23, the system is rounding to 24.
i want rounding to be 24 only when the value is more than 23.5
For less than23.5 it should round off to 22 & not 24
In tax procedure Alternative Calculation type 17 is maintained against the Condition types.
Also in transaction OB90 the rounding unit is 100 against the Company code.
What should be done to give Proper rounding value depending on the value after decimal placeHi
1) How to make to cash configuration so that cash contra entry gets affected to other cash jouanl automatically.
Use the Cash Journal postings with different busi transaction which transfers the amount to differenet Cash account
2)how to view financial statment business area wise.
TCODE:F.01
3)Presently we maintain two business area how to make it manadatory field for end users.When i did it mandatory,i am not able to post entries in FBCJ.I used OBC4.Can anyone guide me where am i making mistake.
Instead of doing it through OBC4, write a validation (TCODE:GGB0 & OB28)
VVR -
Hi every1,
i am in a very bad situation as i am very new to AS3, so i
need some help from any one who can help me out of this.
I have created a FLV Player using FLVPlayback Component
everything is working fine but the only problem is the rewind and
forward button behaves very strange when i test it on web page
residing in a webserver.
In brief i want to say that the rewind and forward control in
the application works alright when i play it in my local machine
but when i take the file to a web sever and play it the controls
behave very strange (when i click on the forward and rewind button
it just takes me to the end of the movie and to the start of the
movie at one shot which should not be the purpose of the rewind and
forward button).
So, somebody please look at my code below and i will be very
thank full to the person who can send me the correct code.
The code for the rewind and forward control is higlighted in
the below code. please help... .very urgent..........
import fl.video.*;
var flvSou:String;
var dynText:String;
myflv.autoPlay = true;
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
if (myflv.playing) {
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
//myflv.source = "Call_to_action.flv";
myflv.source = root.loaderInfo.parameters.flvSou;
dynTxt.text = String(root.loaderInfo.parameters.dynText);
slash_txt.text = "/";
myflv.playPauseButton = playPause_btn;
myflv.stopButton = stop_btn;
myflv.muteButton = mute_btn;
myflv.volumeBar = volume_bar;
myflv.volume = .6;
myflv.forwardButton = forward_btn;
myflv.backButton = back_btn;
myflv.seekBar = seek_bar;
myflv.bufferingBar = buffering_bar;
myflv.fullScreenButton = fullscreen_btn;
//========================= Actions for Button Controls
=========================//
//========================= Actions for Play and Pause Button
=========================//
playPause_btn.pause_mc.addEventListener(MouseEvent.CLICK,
clickHandlerPause);
function clickHandlerPause(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " +
event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked pause button");
onscreen_play_btn.visible = true;
//myflv.alpha = .5; // uncomment later
playPause_btn.play_mc.addEventListener(MouseEvent.CLICK,
clickHandlerPlay);
function clickHandlerPlay(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " +
event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked play button");
onscreen_play_btn.visible = false;
//myflv.alpha = 100; // uncomment later
if (onscreen_replay_btn.visible==true) {
onscreen_replay_btn.visible=false;
//========================= Actions for Play and Pause Button
=========================//
//========================= Actions for FLVPlayback
=========================//
myflv.addEventListener(MouseEvent.CLICK,
clickHandlerPauseFlv);
function clickHandlerPauseFlv(event:MouseEvent):void {
//trace("clickHandler detected an event of type: " +
event.type);
//trace("the event occurred on: " + event.target.name);
trace("u clicked video component button");
trace(myflv.totalTime);
if (myflv.playing==true) {
myflv.pause();
onscreen_play_btn.visible = true;
//myflv.alpha = .5; // uncomment later
} else {
myflv.play();
onscreen_play_btn.visible = false;
onscreen_replay_btn.visible = false;
//myflv.alpha = 100; // uncomment later
//========================= Actions for FLVPlayback
=========================//
//========================= Actions for Fullscreen Button
=========================//
fullscreen_btn.addEventListener(MouseEvent.CLICK,onFullScreenButtonClick);
function onFullScreenButtonClick(event:MouseEvent):void {
stage.displayState = StageDisplayState.FULL_SCREEN;
//or set it to normal like: stage.displayState =
StageDisplayState.NORMAL;
//========================= Actions for Fullscreen Button
=========================//
//========================= Actions for onScreenPlay Button
=========================//
onscreen_play_btn.addEventListener(MouseEvent.CLICK,onScreenPlayButtonClick);
function onScreenPlayButtonClick(event:MouseEvent):void {
trace("working");
if (myflv.playing==true) {
myflv.pause();
} else {
myflv.play();
//myflv.alpha = 100; // uncomment later
onscreen_play_btn.visible = false;
//========================= Actions for onScreenPlay Button
=========================//
//========================= Actions for onScreenReplay Button
=========================//
onscreen_replay_btn.addEventListener(MouseEvent.CLICK,onScreenReplayButtonClick);
function onScreenReplayButtonClick(event:MouseEvent):void {
trace("working");
myflv.play();
//myflv.seek(0);
onscreen_replay_btn.visible = false;
if (onscreen_play_btn.visible==true) {
onscreen_play_btn.visible=false;
//========================= Actions for onScreenReplay Button
=========================//
//========================= Actions for Stop Button
=========================//
stop_btn.addEventListener(MouseEvent.CLICK, StopButtonClick);
function StopButtonClick(event:MouseEvent):void {
myflv.seek(0);
//myflv.autoRewind = true;
//myflv.stop();
onscreen_replay_btn.visible = true;
//========================= Actions for Stop Button
=========================//
//========================= Actions for Button Controls
=========================//
//========================= Actions for Displaying Elapsed
and Total Time =========================//
myflv.addEventListener(MetadataEvent.METADATA_RECEIVED,
cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
//trace("Elapsed time in seconds: " + myflv.playheadTime);
//trace("Total time is: " + eventObject.info.duration);
var rounded:int = Math.round(eventObject.info.duration);
var minutes:int = Math.floor(rounded/60);
var seconds:int = rounded%60;
flvTotalTime_txt.text = eventObject.info.duration;
flvTotalTime_txt.text = (minutes<10 ? "0" :
"")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
//flvElapsedTime_txt.text = String(myflv.playheadTime);
stage.addEventListener(Event.ENTER_FRAME, updateTime);
function updateTime(ev:Event):void {
var rounded:int = Math.round(myflv.playheadTime);
var minutes:int = Math.floor(rounded/60);
var seconds:int = rounded%60;
flvElapsedTime_txt.text = String(myflv.playheadTime);
flvElapsedTime_txt.text = (minutes<10 ? "0" :
"")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
//========================= Actions for Displaying Elapsed
and Total Time =========================//
myflv.addEventListener(Event.COMPLETE, com_listener);
function com_listener(eventObject:Event):void {
trace("movie complete");
myflv.stop();
onscreen_replay_btn.visible = true;
back_btn.addEventListener(MouseEvent.CLICK, BackButtonClick);
function BackButtonClick(event:MouseEvent):void {
myflv.play();
//myflv.autoRewind = true;
//myflv.stop();
onscreen_replay_btn.visible = false;
/************************************ THE CODE FOR FORWARD
AND REWIND CONTROL STARTS HERE *****************************/
var id1:Number;
forward_btn.addEventListener(MouseEvent.MOUSE_DOWN,
ForwardButtonDown);
function ForwardButtonDown(event:MouseEvent):void {
//forward_btn.onPress = function() {
//mklik_flv.pause();
var dest1:Number = myflv.playheadTime;
id1 = setInterval(function ():void {
myflv.seek(dest1 += 2);
}, 100);
forward_btn.addEventListener(MouseEvent.MOUSE_UP,
ForwardButtonUp);
function ForwardButtonUp(event:MouseEvent):void {
//forward_btn.onRelease = function() {
//myflv.play();
clearInterval(id1);
// ************************ Forward Button Function
// ************************ Rewind Button Function
var id2:Number;
back_btn.addEventListener(MouseEvent.MOUSE_DOWN,
BackButtonDown);
function BackButtonDown(event:MouseEvent):void {
//back_btn.onPress = function() {
//mklik_flv.pause();
var dest2:Number = myflv.playheadTime;
id2 = setInterval(function ():void {
myflv.seek(dest2 -= 2);
}, 100);
back_btn.addEventListener(MouseEvent.MOUSE_UP, BackButtonUp);
function BackButtonUp(event:MouseEvent) {
//back_btn.onRelease = function() {
//mklik_flv.play();
clearInterval(id2);
}how long is your flv (in seconds), if allowed to play without
ff/rewind/pause? -
CATS Issue VERY Urgent..
HI ALL,
BiW PROD is placing CATS data for 2007 in to week 52 2006. Can advise why?
Please advise what would be the error.
Cheers,
SriHi All,
We have a problem for 0CALWEEK in CATS.
FOR 0CALQUARTER
20061 means 1st quarter
20062 means 2ND quarter
20063 means 3RD quarter
20064 means 4TH quarter
FOR 0calweeK:
20061 means 1st WEEK
20062 means 2ND WEEK
20063 means 3RD WEEK
20064 means 4TH WEEK
0CALWEEK is giving problem IN CUBE.
It shows wrongly.
0CALQUARTER 0CAL WEEk
2007 1 2006 52 ( 52 week)
2007 1 2006 52
<b>0CAL WEEk should show 2007 1 instead of 2006 52.</b>
It should show :
0CALQUARTER 0CAL WEEk
2007 1 2007 1 (ist week in 2007)
2007 1 2007 1
we have a routine on 0CAL_week
=====
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
data: employee_md like /bi0/memployee,
employee_wa like /bi0/memployee,
person_md like /bi0/mperson,
PERSON_WA LIKE /BI0/MPERSON.
DATA: G_RECORD_NO LIKE SY-TABIX.
INCLUDE RS_BCT_HR_UPDATE_RULES_GENERAL.
INCLUDE RS_BCT_HR_PAPA_UPDATE_RULES.
$$ end of global - insert your declaration only before this line -
FORM compute_characteristics
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS0CATS_IS_1
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/VZCATST-CALWEEK
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
data: w_date type d.
data: w_date_check type d.
data: w_numberofdays type p decimals 2.
data: w_numberofweeks type i.
data: w_dayofweek type p.
data: w_first_day_of_sap_calendar type d value '19790101'.
data: check type i.
data: w_year(4) type c.
data: w_weekno(2) type c.
w_date_check = COMM_STRUCTURE-CALDAY.
w_date = w_date_check.
w_date+04(04) = '0101'. " beginning of the year
do.
w_dayofweek = ( ( w_date - w_first_day_of_sap_calendar ) mod 7 ) + 1.
if w_dayofweek = 7. " First sunday(7) of the Current year
exit.
endif.
add 01 to w_date+07(01).
enddo.
w_numberofdays = ( w_date_check - w_date ) + 1.
w_numberofweeks = ceil( w_numberofdays / 7 ).
w_year = w_date_check+0(4).
if w_numberofweeks = 53.
w_numberofweeks = 1.
w_year = w_date_check+0(4) + 1.
endif.
if w_numberofweeks = 0.
w_numberofweeks = 52.
w_year = w_date_check+0(4) - 1.
endif.
w_weekno = w_numberofweeks.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = w_weekno
importing
output = w_weekno.
concatenate w_year w_weekno into RESULT.
result value of the routine
RESULT = .
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
========
This is giving problem from 2007 year only.
We need to check with FI or HR teams , Is there any configuration settings in R/3 side for 0Calweek?
This is production ISSUE. Help me on very Urgent BASIS!!
Thanks & Regards,
Sri. -
File Upload Help Needed - Very Urgent
Dear All
I am making a application in Webdynpro for uploading an excel file to the server. Can someone give me a demo application so that I can run it and see whether my server is configured or not. Also I have made the application right now and have coded the need full. But when I select a file and say submit it shows me a page not found error. Currently I am working round the clock on my project and am stuck up here. Its very urgent can any body help please with an example or a demo application.
Regards GauravHi,
Check whether in server, MultipartBodyParameterName property is set to "com.sap.servlet.multipart.body" . You can check this by going to Visual Admin -> Cluster tab -> Services -> web container -> Properties sheet.
Do assign points if i answered your question.
Regards
Vasu -
Passing parameter from Servlet to javascript in JSP. Very Urgent - 5 jukes!
Well my servlet will retrieve questions from database.
Then the player will answer the question in the JSP and submit the answer to the servlet to process.
Each time an answer is submitted, or a "Next Question" button is clicked, the countdown time will restart.
And will reload the page with a new question.
So how can i do that?
This is my servlet, JSP, javascript
=====================================================================
* Interacts with the player depending on his types of selection and output them
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class GameQuestionServlet extends HttpServlet
String sSQL = null;
String sCategory = null;
String paramName = null;
User userObject = null;
Questions gameQsObj = new Questions();
HttpSession session;
int cnt = -1;
int score = 0;
boolean connected = false;
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
session = request.getSession(false);
//System.out.println("Testing Score:" + score);
if(connected == true)
Questions object = (Questions)gameQsObj.getQsList().elementAt(cnt);
System.out.println("\n" + object.sAns1);
System.out.println(object.sAns2);
System.out.println(object.sAns3 + "\n");
Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements())
paramName = (String)enum.nextElement();
if(paramName.equals("mcq"))
System.out.println(request.getParameter("mcq"));
score = Integer.parseInt(userObject.score.trim());
System.out.println("Player old score: " + score);
//Check to see if the selected answer matches the correct answer
if((object.sCorrect).equals(request.getParameter("mcq")))
score = score + 10;
else
if((object.sCorrect).equals(request.getParameter("mcq")))
score = score + 10;
else
if((object.sCorrect).equals(request.getParameter("mcq")))
score = score + 10;
else
score = score - 10;
System.out.println("Player current score: " + score);
else //will only go into this once
userObject = (User)session.getAttribute("user");
System.out.println("\n"+userObject.nric);
System.out.println(userObject.name);
System.out.println(userObject.password);
System.out.println(userObject.email);
System.out.println(userObject.score+"\n");
//depending on user selection
sCategory = request.getParameter("qsCategory");
sSQL = "SELECT * FROM " + sCategory;
gameQsObj.getQuestions(sSQL, sCategory);
score = Integer.parseInt(userObject.score);
connected = true;
System.out.println("Connected:" + connected);
System.out.println("Before:" + userObject.score);
cnt = cnt + 1; //increment to retrieve next question
userObject.score = Integer.toString(score);
System.out.println("After:" + userObject.score);
if(cnt < 3) //setting for the number of questions per game.
//request.setAttribute("qsCnt", cnt); //count of the question number
request.setAttribute("aQs", gameQsObj.getQsList().elementAt(cnt));
System.out.println(request.getAttribute("aQs"));
System.out.println("This is question number: "+ cnt);
getServletConfig().getServletContext().getRequestDispatcher("/JSP/PlayGame.jsp").forward(request, response);
else
//forward to the result page
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost(request, response);
<%@ page import="Questions" %>
<HTML>
<HEAD>
<TITLE>Play Game</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var refreshinterval=10
var displaycountdown="yes"
var starttime
var nowtime
var reloadseconds=0
var secondssinceloaded=0
function starttime() {
starttime=new Date()
starttime=starttime.getTime()
countdown()
function countdown() {
nowtime= new Date()
nowtime=nowtime.getTime()
secondssinceloaded=(nowtime-starttime)/1000
reloadseconds=Math.round(refreshinterval-secondssinceloaded)
if (refreshinterval>=secondssinceloaded) {
var timer=setTimeout("countdown()",1000)
if (displaycountdown=="yes") {
window.status="You have "+reloadseconds+ " second before timeout"
else {
hide();
clearTimeout(timer)
//window.location.reload(true)
function hide() {
//hidelayer
if(gameLayers.style.visibility == "visible"){
gameLayers.style.visibility = "hidden"
oops.style.visibility = "show"
window.onload=starttime
</SCRIPT>
</HEAD>
<BODY>
<FORM METHOD="post" ACTION="http://localhost:8080/Java_Assignment2/servlet/GameQuestionServlet">
<DIV ID="oops" STYLE="position:absolute; left:300px; top:30px; width:120px; height:150px; z-index:2; visibility:hidden">
Oops! 30 seconds time up!!! <BR><BR>
<INPUT TYPE="submit" VALUE="Next Question">
<INPUT TYPE="hidden" NAME="nextQs" VALUE="Next Question">
</DIV>
<DIV ID="gameLayers" STYLE="position:absolute; left:300px; top:30px; width:120px; height:150px; z-index:3; visibility:show">
<TABLE BORDER="0">
<TR>
<TH><BIG>Questions:</BIG></TH>
</TR>
<%
Questions aQsObj = (Questions)request.getAttribute("aQs");
String aQsBody = aQsObj.sQs;
String aQsAns1 = aQsObj.sAns1;
String aQsAns2 = aQsObj.sAns2;
String aQsAns3 = aQsObj.sAns3;
%>
<TR>
<TD><B><%= aQsBody%></B></TD>
</TR>
<TR>
<TD>
<SELECT SIZE="3" NAME="mcq">
<OPTION SELECTED><%= aQsAns1 %></OPTION>
<OPTION><%= aQsAns2 %></OPTION>
<OPTION><%= aQsAns3 %></OPTION>
</SELECT><BR><BR>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="submit" VALUE="Submit Your Answer">
<INPUT TYPE="hidden" NAME="submitAns" VALUE="Submit Your Answer">
</TD>
</TR>
</TABLE>
</DIV>
</FORM>
</BODY>
</HTML>
This must be answered before 28th of september.
Please help. It is indeed very urgent.this is just a skeleton code.. alot of stuff is not here..
<FORM name = "form1" action="../servlet/wateverSevlet>
<input type="text" name="searchStr" size="40">
<INPUT type="hidden" id=answer name=answer size=7>
<input type="button" name="button" value="Submit Answer" onClick="javascript:submitCheck(document.form1.searchStr.value);">
<input type="button" name="button" value="Skip Question" onClick="javascript:submitCheck('skip');">
</form>
<SCRIPT LANGUAGE="JavaScript">
function submitCheck(str)
form1.answer.value = str
form1.submit()
</script>i assuming you are submitting it to the same servlet regardless of whether the user clicks the skip question or the submit question button. -
To monitorize RMAN restore progress. Very Urgent!!
Hi.
I´m doing a full database restore with RMAN and I need to know the progress of this operation.
Can anybody help me please, is very urgent
Thanks everybodyOk, I´ve skipped the WHERE clause and it likes work...
select sid, serial#, sofar, totalwork, opname, round(sofar/totalwork*100, 2) " % Complete" from v$session_longops;
SID SERIAL# SOFAR TOTALWORK
OPNAME % Complete
9 101 3374079 7774720
RMAN: aggregate input 43,4
11 13 3409663 7774720
RMAN: full datafile restore 43,86
Thanks -
Error while opening a module. plz help me, very urgent.
when i try to open a module, the following error message appears on my screen.
" no j2ee component found in d:\krisp\programs\servlets".
i've installed bea in c: drive and my servlet program is in d: drive.
plz help me, it's very urgent.Can you provide some more information? What were you doing when this happened?
Can you post the entire error message?
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
Need help, MMC tree got deleted, very urgent.
Hi,
My sap MMC tree, got deleted in the server. I have been trying to restore since 2 days and couldnt succeed, please help me.
1) i have uncared the sapmmc.sar from Kernal\NT\I386\MMC\sapmmc.sar file
2) i got about 7 files, in which there is one sapmmc file i have tried to double click it, n check but no go.
3) i also tried to run the Sapstartsrv.exe file and fill in up the values in pop up window. & filled up the following values :-
SID: DEV
NR: 00
StartProfile: (entire start profile path given)
user: devadm
passwd; (given)
- but it says "the account name is invalid or does not exist or the password is invalid for account name specified"/
- no go in both the cases.
Please need help very urgent.
Regards,
Satish.siva,
I am getting same error since 2 days
SID: DEV
NR: 00
Start Profile: (entire start profile path)
User: <hostname>/devadm
passwd: ****
Error:
cannot install service
create service failed:421
The account name is invalid or doesnot exist, or the passwd is invalid for the account name specified.
Edited by: satish c on Jun 4, 2008 11:12 AM -
How to write code for this logic in a routine, very urgent --help me
hi all,
i want to apply this logic into one subroutin ZABC.
here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
4.1 Read the company code number BSEG-BUKRS from document line item.
4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
4.4 If business area match is found, go to step 3.9. Else continue.
4.5 If BKPF-BLART IN set ZVS_POSDT OR BKPF-XBLNR starts with I0*, execute steps below. Else, go to Step 3.6.
i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
i. Insert WA_ZFIBUE INTO ZFIBUE.
ii. Send email notification to the user (if it is not already sent to user on the same posting date).
Use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail.
Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
iii. Increment the running serial number and update ZFICO with new serial number.
a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
b. Update ZFICO Set value1 = GV_SERIALNO
Where PARAMTYPE = "BPM030307" AND
SUBTYPE = "ZFIBUE" AND
KEY1 = "SERIALNO".
iv Move VDFT to BSEG-GSBER.
v. Exit routine.
4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
4.7 If SY-BATCH = INITIAL AND GV_MTART <> ROH, issue the error message - Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>. Else, go to step 3.8.
4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ROH, issue the error message - Maintain product hierarchy on article master. Go to step 3.10.
4.9 Move GV_GSBER TO BSEG-GSBER.
4.10 Exit Routine
plz give me reply asap --this is very urgent
thanks in advance
swathiHi Swathi,
If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop. -
Update Routine ... Help me Please--VERY URGENT
Hi All ,
I Moving data from Cube to ODS . Let me explain abt the records in the cube .
There are 6 key figures in the cube as well as dimensions, UNIQKEY TRANSACTION is One Dimension and ARTICLE is another dimension which is having an Navigational attribute called CORE ELEMENT.
I am showing the data with those two dimension and the key figures which are to be used in the routine.
Charc----
Key Figures
UNIQKEY-ARTICLE-Coreelement--
billqty
in base unit
A00N----1006330--1--
10.5
A00M -
1006320----2--
2.5
A00P-----1006330--1--
10.5
A00P-----1006320--2--
2.5
A00Q-----1006320--2--
2.5
A00Q-----1006340--3--
10.5
Now Lets see what the core element numbers mean,
core element 1 means -- fuel .
Core elemnet other 1 -- food .
I need to move these data into ODS Which will have an extra field called No of items in the transaction --ITEMS.For this i need to write a routine .
The Logic is ...
1.if Materail is of type 1(Means if the core element - 1)
I need to Populate the No of items in tnx = 1 .--ITEMS.
2.If Material is of type(Means if the core element)2or 3 I need to populate the billing quantity to the no of transcations.--ITEMS
3. If the Uniqkey tanscation contains two line items as suppose that you have 20 litres of fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing Quantity in BUoM 22
billing quantity in BUoM = 20 litres for the first line item and 2 for the second line item...
then as the first line item is fuel, field No OF Items in the Transcation should be 1 (replacing the 20) + 2 = 3
so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the Transcation= 3
So the ODS Data should look like this.
UNIQKEY--billqty--
ITEMS
in base unit
A00N--10.5--
1
A00M--2.5--
2.5
A00P--13--
3.5
A00Q--13--
12.5
NOTE : IN the ODS only the UNIQKEY IS THE KEY FIELD and the rest are DATA FIELDS.
I Posted this one before also. But didnt get proper responses.
I am Pasting the piece of code which I have written . This code will work for the first two records in the cube , But it is failing for the UNIQKEY Transcation having Line items.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: /BI0/PMATERIAL.
DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
check not COMM_STRUCTURE-material is initial.
select SINGLE RPA_WGH1
INTO CORE_ELEMENT
from /BI0/PMATERIAL
where
material = COMM_STRUCTURE-material
and OBJVERS <>'D'.
IF CORE_ELEMENT EQ '1'.
TITEMS = '1'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = titems
IMPORTING
OUTPUT = titems
ELSE.
TITEMS = COMM_STRUCTURE-BILL_QTY.
ENDIF.
result value of the routine
RESULT = TITEMS..
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
PLease give me ideas on how to acheive this . As I am not Aware of ABAP very well.. PLease try to give me the code. I hope one of you may got the same requirement before.
Its very urgent and I need to deliver it today itself.
Thanks in advance , you can mail me to [email protected]. If anybody intersted to discuss this Issue they can reach at +91 9845922955.Hi ,
While I am moving the data from cube to ods . I need to create the update rules with cube -- 8cube . WHen i am doing this the billqty is a key figure in cube so that is not a problem but the ITEMS is not there in the cube ,SO for that I need to write a routine to populate that one.
Its strange but the user what to analyse with the UNIQKEY transaction. And these objects will be added as navigational attributes to the Characteristic. as it acts as another dimension.
He wants to laod these from ODS to Master data -Characteristic.
to say for each transcation hpw many items are getting sold.
Message was edited by: Nagarjuna Reddy
ONce again thanks for the qucik replies
Message was edited by: Nagarjuna Reddy -
UPDATE ROUTINE --- CUBE --- ODS Very Very URGENT
Hi Collegues/Friends ,
First I need to thank for the intiators of this site , as I came to know that for many
problems we will get different best solutions ... Hoping the same I am posting a question
which is very very very urgent as the client is running after me for this .
My Requirement is as Follows. ..
I Moving the data from Cube to ODS . While i need to write a routine for an extra field in
ODS based on Billing Quantity in Base Unit of Measure . The Key Field in the ODS Is UNIQKEY
Transaction and It is a Characterstic in the Cube and we have MAterial as another
Characteristic and core element as navigational attribute .
In the Cube for every UNIQKEY transaction- there are more than One line items.
My data fields in the ODS are Billing Quantity in Base Unit of MEasure and and EXTRA FIELD
: No of Items in Transaction . But the thing is that I have only Billing Quantity in Base
Unit of Measure in cube as a key figure
BAsing on the UNIQKEY transcation and Billing Quantity In Base Unit Of Measure I need to
populate the No of Items in Transaction... For this i need to write a routine .
Let suppose say that for the Materials the core elements are as follows
Material Core element
10 1 -- fuel -- In liters
20 2 -- Cigar - in PAck
30 3 -- Coke - in Cans
Now Lets see how the records are there in InfoCUbe
Uniqkey / Material / Core element /Billin Quantiy
A / 10 / 1 / 22
B / 30 / 3 / 2
C / 10 / 1 / 15
C / 30 / 3 / 2
D / 20 / 2 / 10
D / 30 / 3 / 2
And IN the ODS -- I need to Populate the No OF items in Transaction.
the Logic behind this as follows .
1.if Materail is of type 1(Mean if the core element - 1)
I need to Populate the No of items in tnx = 1
2.If Material id of type 2 or 3 I need to populate the billing quantity to the no of
transcations.
3. If the Uniqkey tanscation contains two line items as suppose that you have 20 litres of
fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing
Quantity in BUoM 22
billing quantity in BUoM = 20 litres for the first line item and 2 for the second line
item...
then as the first line item is fuel, field No OF Items in the Transcation should be 1
(replacing the 20) + 2 = 3
so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the
Transcation = 3
For this I have Written a Rouinte like this for that field
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: /BI0/PMATERIAL.
DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
RETURNCODE LIKE SY-SUBRC "Do not use!
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
check not COMM_STRUCTURE-material is initial.
select SINGLE RPA_WGH1
INTO CORE_ELEMENT
from /BI0/PMATERIAL
where
material = COMM_STRUCTURE-material
and OBJVERS <>'D'.
IF CORE_ELEMENT EQ '1'.
TITEMS = '1'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = titems
IMPORTING
OUTPUT = titems
ELSE.
TITEMS = COMM_STRUCTURE-BILL_QTY.
ENDIF.
result value of the routine
RESULT = TITEMS..
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
Does it satisfy all the conditions ?? mentioned above if . As far As i know as the only key
field in the transcation it will satisfy the first two conditions .
I want to know or If possioble anybody pls take some pain for me to send the code or any
Ideas for satisfying all the conditions.
Hope I will get immediate replies....
Mail me to [email protected]Reddy,
Please do not post in all sections ... makes it hard to follow up on posts..
Arun -
Open items for purchase order its very urgent
hi
my requirement is to write extract program for purchase order(me21) to extract only open items.
please provide sample code its very urgent.
thanks in advance.
points will be rewarded.
thanks
hari prasad reddycheck the below report :
REPORT ZMM_OPEN_PO_REPORT no standard page heading
line-size 255
message-id zwave.
======================================================================
Program Name : ZMM_OPEN_PO_REPORT *
Description : This report displays all Open PO Items and output *
would be PO Number,Material number and so on *
Author : Seshu *
Date : 01/24/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
01/24/07| Seshu | DEVK921979 | Initial *
D A T A D E C L A R A T I O N P A R T ***
type-pools
type-pools : slis.
Tables
tables : ekko, " Purchase order Header
ekpo, " Purchase order Item
marc. " Material with Plant data
Internal table for output.
data : begin of i_output occurs 0,
ebeln like ekko-ebeln,
matnr like ekpo-matnr,
end of i_output.
ALV Data declaration.
data : v_repid like sy-repid.
ALV Function Module Variables
DATA: gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
data : gr_layout_bck type slis_layout_alv.
Ranges
ranges r_eindt for eket-eindt.
initialization.
v_repid = sy-repid.
start-of-selection.
Get the data from EKKO ,EKPO and MARC Table
perform get_data_tables.
end-of-selection.
display the data in the form of ALV
perform display_data.
*& Form get_data_tables
Get the data from EKKO,EKPO and MARC Table
FORM get_data_tables.
clear : i_output.
refresh : i_output.
fill the dates in ranges
r_eindt-low = sy-datum - 7.
r_eindt-high = sy-datum + 14.
r_eindt-option = 'BT'.
r_eindt-sign = 'I'.
append r_eindt.
Get the data from EKKO,EKPO and EKET Tables
select aebeln bmatnr into table i_output
from ekko as a inner join
ekpo as b on aebeln = bebeln
inner join marc as c on cmatnr = bmatnr
inner join mara as d on dmatnr = bmatnr
inner join eket as e on eebeln = aebeln
and eebelp = bebelp
where c~beskz = 'E'
and c~werks = '1000'
and d~mtart = 'FERT'
and b~loekz = space
and b~elikz = space
and e~eindt in r_eindt.
if sy-subrc ne 0.
message e000(zwave) with 'No open purchase order found'.
endif.
ENDFORM. " get_data_tables
*& Form display_data
text
FORM display_data.
Fill the Fiedlcat
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gr_layout_bck
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = g_save
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_output
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM. " display_data
*& Form fieldcat_init
text
-->P_GT_FIELDCAT[] text
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Purchase order number
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EBELN'.
LS_FIELDCAT-ref_fieldname = 'EBELN'.
LS_FIELDCAT-ref_tabname = 'EKKO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Purchase Order'.
ls_fieldcat-seltext_M = 'Purchase Order'.
ls_fieldcat-seltext_S = 'Purchase Order'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'EKPO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " fieldcat_init -
Communication b/w SAP and VB .exe file - Very urgent.
hi,
I am currently in a project implementing SAP for a cement manufacturing company. Here we have a VB .exe file which takes parameters and return values. now we need to connect this to application to SAP R/3 to pass data to that application and access the data from that .exe file.
Note: we don't have any source code for that vb .exe file its a third party software.
Its an very urgent one....
please guide me how to do it with all steps.
Any material please pass to [email protected]
Thanks in advance.form grosswt .
refresh itab3.
clear itab3.
Executing VB EXE file to get the weight from weigh bridge
call function 'WS_EXECUTE'
exporting
DOCUMENT = ' '
CD = ' '
COMMANDLINE = ' '
inform = 'X'
cd = 'C:\SAPWEI'
program = 'C:\sapwei\MyVB.exe'
STAT = ' '
WINID = ' '
OSMAC_SCRIPT = ' '
OSMAC_CREATOR = ' '
WIN16_EXT = ' '
EXEC_RC = ' '
IMPORTING
RBUFF =
EXCEPTIONS
FRONTEND_ERROR = 1
NO_BATCH = 2
PROG_NOT_FOUND = 3
ILLEGAL_OPTION = 4
GUI_REFUSE_EXECUTE = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Fetching Value from VB text file
call function 'WS_UPLOAD'
exporting
CODEPAGE = ' '
filename = 'C:\sapwei\w1.txt'
FILETYPE = 'ASC'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
tables
data_tab = itab3
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab3.
v1 = itab3-num.
pgrwt = v1.
endloop.
message 'Save Gross Weight' type 'S'.
endform. " grosswt
Maybe you are looking for
-
Goods Receipt and Serial Numbers
I'm getting the following error "[IGN1.WhsCode][line: 1] , 'This entry already exists in the following tables (ODBC -2035)'" when trying to add a goods receipt document containing a single item that is serial number managed via the DI API. We are ru
-
Why do I get the message "Cannot send mail, the user name and or password for my email outgoing server is incorrect"? I use the same account, etc. on my iPhone and haven't any trouble sending mail.
-
I can't connect to itunes music store ..
my music store won't work. for a few weeks now i've been getting an error message saying "Itunes could not connect to the Music Store. An unknown error has occured [-3221]." i've redownloaded itunes && the first few times the store worked but now not
-
Please help! (I'm actually doing this for a friend but still) All you need to know: - iPhone 4 16GB - iOS 6.0.3 (I think, not the latest iOS but the one before that) - Song which started to act strange: niggas in Paris - All songs work fine on headph
-
Procedure for Mapping two types of Idocs from RFC function Module
Hi My Scenario is RFC -- XI -- IDOC Here i have 2 custom Idocs First IDOC for Creation second is for Deletion/Changing Based on the condition from RFC it should trigger either one of the IDOC above. Please provide me the procedure to do in IR and ID.