Get_month function ?
Is there a package function that allows me to get the current month, like wwctx_api.get_month or something like that?
thank you for your help.
Bertrand
Bertrand,
you could use to_char(sysdate,'month')
Hth,
Ton
Similar Messages
-
Calendar Functionality for a date field in HTML of a ITS service
Hi
I am working with SRM EBP module we want to add date help(with calendar function) to existign date fields in Shopping cart and PO screens . I found some HTML and Javascripts in SYSTEM and BBPGLOBAL services (named as calendar)but not sure which ones to use if anyone used date functionality or even have access to Standard SAP ITS screens that already have date field with calendar fuctionality can you help???????????????
Thanks in AdvanceHi
Let me first thank you for the quick response and timely help you provided calendar popup works great but one minor issue i am not able to click on the date entry and bring the field back into the field not sure if this funcitonality is in show_calendar.
I would really appreciate if you get time to look at below i am almost there with your help......thanks again
Here are the steps I did
I have a HTML page SAPLBBP_SC_UI_ITS screen 300 in SRM module , I created a new HTML page (zcalendar.html) in the same internet service BBPSC01 as suggested and I included in my HTML page SAPLBBP_SC_UI_ITS screen 300 and also I added below code to add a icon and a href call to the show_calendar function.
Code works great I get the popup but when I double click on the date it is not selecting the date into the field back .
Any thoughts??????
<!-- Start ghantavine -->
`include (~service="bbpsc01", ~name="zcalendar.html")`
<!-- End ghantavine -->
<!-- 10/24/05 ghantavine--delivary date -->
`TR()`
`if (GS_SCR_BASIC_I-DELIV_DATE.visible)`
`TR()`
`if (gs_scr_basic_i-deliv_date.disabled)`
`TD(class="label", nowrap="x",
active="")``TXT_BASIC_I-DELIV_DATE.label`
`TD(class="label", nowrap="x", active="")``gs_scr_basic_i-deliv_date.value`
`else`
`TD(class="label", nowrap="x", active="")`<label
for="`GS_SCR_BASIC_I-DELIV_DATE.name`">`TXT_BASIC_I-DELIV_DATE.label`</label>
`TD(class="data", nowrap="x")`
<input type="text" id="GS_SCR_BASIC_I-DELIV_DATE"
name="GS_SCR_BASIC_I-DELIV_DATE" value="`GS_SCR_BASIC_I-DELIV_DATE.value`"
maxlength="010" size="008">
<a href=http://mail.yahoo.com/config/login?/"_javascript:show_calendar();">
<img id="anchor1" src="`mimeurl(~service="bbpglobal",
~name="images/button/f4.gif", ~language="", ~theme="99")`" />
</a>
`end`
`TR()` `Lines()`
`end`
<!-- 10/24/05 ghantavine--delivary date -->
below is the showcalendar code
Hi , u save this as a html file and call this show_calendar fn from Onclick button of your Calendar image .
// For generating the calendar
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;
var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
if ((p_month == null) && (p_year == null)) return;
if (p_WinCal == null)
this.gWinCal = ggWinCal;
else
this.gWinCal = p_WinCal;
if (p_month == null) {
this.gMonthName = null;
this.gMonth = null;
this.gYearly = true;
} else {
this.gMonthName = Calendar.get_month(p_month);
this.gMonth = new Number(p_month);
this.gYearly = false;
this.gYear = p_year;
this.gFormat = p_format;
this.gBGColor = "white";
this.gFGColor = "black";
this.gTextColor = "black";
this.gHeaderColor = "black";
this.gReturnItem = p_item;
Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;
function Calendar_get_month(monthNo) {
return Calendar.Months[monthNo];
function Calendar_get_daysofmonth(monthNo, p_year) {
Check for leap year ..
1.Years evenly divisible by four are normally leap years, except for...
2.Years also evenly divisible by 100 are not leap years, except for...
3.Years also evenly divisible by 400 are leap years.
if ((p_year % 4) == 0) {
if ((p_year % 100) == 0 && (p_year % 400) != 0)
return Calendar.DOMonth[monthNo];
return Calendar.lDOMonth[monthNo];
} else
return Calendar.DOMonth[monthNo];
function Calendar_calc_month_year(p_Month, p_Year, incr) {
Will return an 1-D array with 1st element being the calculated month
and second being the calculated year
after applying the month increment/decrement as specified by 'incr' parameter.
'incr' will normally have 1/-1 to navigate thru the months.
var ret_arr = new Array();
if (incr == -1) {
// B A C K W A R D
if (p_Month == 0) {
ret_arr[0] = 11;
ret_arr[1] = parseInt(p_Year) - 1;
else {
ret_arr[0] = parseInt(p_Month) - 1;
ret_arr[1] = parseInt(p_Year);
} else if (incr == 1) {
// F O R W A R D
if (p_Month == 11) {
ret_arr[0] = 0;
ret_arr[1] = parseInt(p_Year) + 1;
else {
ret_arr[0] = parseInt(p_Month) + 1;
ret_arr[1] = parseInt(p_Year);
return ret_arr;
function Calendar_print() {
ggWinCal.print();
function Calendar_calc_month_year(p_Month, p_Year, incr) {
Will return an 1-D array with 1st element being the calculated month
and second being the calculated year
after applying the month increment/decrement as specified by 'incr' parameter.
'incr' will normally have 1/-1 to navigate thru the months.
var ret_arr = new Array();
if (incr == -1) {
// B A C K W A R D
if (p_Month == 0) {
ret_arr[0] = 11;
ret_arr[1] = parseInt(p_Year) - 1;
else {
ret_arr[0] = parseInt(p_Month) - 1;
ret_arr[1] = parseInt(p_Year);
} else if (incr == 1) {
// F O R W A R D
if (p_Month == 11) {
ret_arr[0] = 0;
ret_arr[1] = parseInt(p_Year) + 1;
else {
ret_arr[0] = parseInt(p_Month) + 1;
ret_arr[1] = parseInt(p_Year);
return ret_arr;
// This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists.
new Calendar();
Calendar.prototype.getMonthlyCalendarCode = function() {
var vCode = "";
var vHeader_Code = "";
var vData_Code = "";
// Begin Table Drawing code here..
vCode = vCode + "<TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\">";
vHeader_Code = this.cal_header();
vData_Code = this.cal_data();
vCode = vCode + vHeader_Code + vData_Code;
vCode = vCode + "</TABLE>";
return vCode;
Calendar.prototype.show = function() {
var vCode = "";
this.gWinCal.document.open();
// Setup the page...
this.wwrite("<html>");
this.wwrite("<head><title>Calendar</title>");
this.wwrite("</head>");
this.wwrite("<body " +
"link=\"" + this.gLinkColor + "\" " +
"vlink=\"" + this.gLinkColor + "\" " +
"alink=\"" + this.gLinkColor + "\" " +
"text=\"" + this.gTextColor + "\">");
this.wwriteA("<FONT FACE='" + fontface + "' SIZE=2><B>");
this.wwriteA(this.gMonthName + " " + this.gYear);
this.wwriteA("</B><BR>");
// Show navigation buttons
var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
var prevMM = prevMMYYYY[0];
var prevYYYY = prevMMYYYY[1];
var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
var nextMM = nextMMYYYY[0];
var nextYYYY = nextMMYYYY[1];
this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
");" +
"\"><<<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
");" +
"\"><<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
");" +
"\">><\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
");" +
"\">>><\/A>]</TD></TR></TABLE><BR>");
// Get the complete calendar code for the month..
vCode = this.getMonthlyCalendarCode();
this.wwrite(vCode);
this.wwrite("</font></body></html>");
this.gWinCal.document.close();
Calendar.prototype.showY = function() {
var vCode = "";
var i;
var vr, vc, vx, vy; // Row, Column, X-coord, Y-coord
var vxf = 285; // X-Factor
var vyf = 200; // Y-Factor
var vxm = 10; // X-margin
var vym; // Y-margin
if (isIE) vym = 75;
else if (isNav) vym = 25;
this.gWinCal.document.open();
this.wwrite("<html>");
this.wwrite("<head><title>Calendar</title>");
this.wwrite("<style type='text/css'>\n<!--");
for (i=0; i<12; i++) {
vc = i % 3;
if (i>=0 && i<= 2) vr = 0;
if (i>=3 && i<= 5) vr = 1;
if (i>=6 && i<= 8) vr = 2;
if (i>=9 && i<= 11) vr = 3;
vx = parseInt(vxf * vc) + vxm;
vy = parseInt(vyf * vr) + vym;
this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}");
this.wwrite("-->\n</style>");
this.wwrite("</head>");
this.wwrite("<body " +
"link=\"" + this.gLinkColor + "\" " +
"vlink=\"" + this.gLinkColor + "\" " +
"alink=\"" + this.gLinkColor + "\" " +
"text=\"" + this.gTextColor + "\">");
this.wwrite("<FONT FACE='" + fontface + "' SIZE=2><B>");
this.wwrite("Year : " + this.gYear);
this.wwrite("</B><BR>");
// Show navigation buttons
var prevYYYY = parseInt(this.gYear) - 1;
var nextYYYY = parseInt(this.gYear) + 1;
this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" +
");" +
"\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" +
");" +
"\">>><\/A>]</TD></TR></TABLE><BR>");
// Get the complete calendar code for each month..
var j;
for (i=11; i>=0; i--) {
if (isIE)
this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
else if (isNav)
this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
this.gMonth = i;
this.gMonthName = Calendar.get_month(this.gMonth);
vCode = this.getMonthlyCalendarCode();
this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>");
this.wwrite(vCode);
if (isIE)
this.wwrite("</DIV>");
else if (isNav)
this.wwrite("</LAYER>");
this.wwrite("</font><BR></body></html>");
this.gWinCal.document.close();
Calendar.prototype.wwrite = function(wtext) {
this.gWinCal.document.writeln(wtext);
Calendar.prototype.wwriteA = function(wtext) {
this.gWinCal.document.write(wtext);
Calendar.prototype.cal_header = function() {
var vCode = "";
vCode = vCode + "<TR>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='16%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
vCode = vCode + "</TR>";
return vCode;
Calendar.prototype.cal_data = function() {
var vDate = new Date();
vDate.setDate(1);
vDate.setMonth(this.gMonth);
vDate.setFullYear(this.gYear);
var vFirstDay=vDate.getDay();
var vDay=1;
var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
var vOnLastDay=0;
var vCode = "";
Get day for the 1st of the requested month/year..
Place as many blank cells before the 1st day of the month as necessary.
vCode = vCode + "<TR>";
for (i=0; i<vFirstDay; i++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT SIZE='2' FACE='" + fontface + "'> </FONT></TD>";
// Write rest of the 1st week
for (j=vFirstDay; j<7; j++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
"<A HREF='#' " +
"onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
this.format_data(vDay) +
"';window.close();\">" +
this.format_day(vDay) +
"</A>" +
"</FONT></TD>";
vDay=vDay + 1;
vCode = vCode + "</TR>";
// Write the rest of the weeks
for (k=2; k<7; k++) {
vCode = vCode + "<TR>";
for (j=0; j<7; j++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
"<A HREF='#' " +
"onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
this.format_data(vDay) +
"';window.close();\">" +
this.format_day(vDay) +
"</A>" +
"</FONT></TD>";
vDay=vDay + 1;
if (vDay > vLastDay) {
vOnLastDay = 1;
break;
if (j == 6)
vCode = vCode + "</TR>";
if (vOnLastDay == 1)
break;
// Fill up the rest of last week with proper blanks, so that we get proper square blocks
for (m=1; m<(7-j); m++) {
if (this.gYearly)
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'> </FONT></TD>";
else
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>";
return vCode;
Calendar.prototype.format_day = function(vday) {
var vNowDay = gNow.getDate();
var vNowMonth = gNow.getMonth();
var vNowYear = gNow.getFullYear();
if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear)
return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>");
else
return (vday);
Calendar.prototype.write_weekend_string = function(vday) {
var i;
// Return special formatting for the weekend day.
for (i=0; i<weekend.length; i++) {
if (vday == weekend<i>)
return (" BGCOLOR=\"" + weekendColor + "\"");
return "";
Calendar.prototype.format_data = function(p_day) {
var vData;
var vMonth = 1 + this.gMonth;
vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
var vY4 = new String(this.gYear);
var vY2 = new String(this.gYear.substr(2,2));
var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;
/* switch (this.gFormat) {
case "MM\/DD\/YYYY" :
vData = vMonth + "\/" + vDD + "\/" + vY4;
break;
case "MM\/DD\/YY" :
vData = vMonth + "\/" + vDD + "\/" + vY2;
break;
case "MM-DD-YYYY" :
vData = vMonth + "-" + vDD + "-" + vY4;
break;
case "MM-DD-YY" :
vData = vMonth + "-" + vDD + "-" + vY2;
break;
case "DD\/MON\/YYYY" :
vData = vDD + "\/" + vMon + "\/" + vY4;
break;
case "DD\/MON\/YY" :
vData = vDD + "\/" + vMon + "\/" + vY2;
break;
case "DD-MON-YYYY" :
vData = vDD + "-" + vMon + "-" + vY4;
break;
case "DD-MON-YY" :
vData = vDD + "-" + vMon + "-" + vY2;
break;
case "DD\/MONTH\/YYYY" :
vData = vDD + "\/" + vFMon + "\/" + vY4;
break;
case "DD\/MONTH\/YY" :
vData = vDD + "\/" + vFMon + "\/" + vY2;
break;
case "DD-MONTH-YYYY" :
vData = vDD + "-" + vFMon + "-" + vY4;
break;
case "DD-MONTH-YY" :
vData = vDD + "-" + vFMon + "-" + vY2;
break;
case "DD\/MM\/YYYY" :
vData = vDD + "\/" + vMonth + "\/" + vY4;
break;
case "DD\/MM\/YY" :
vData = vDD + "\/" + vMonth + "\/" + vY2;
break;
case "DD-MM-YYYY" :
vData = vDD + "-" + vMonth + "-" + vY4;
break;
case "DD-MM-YY" :
vData = vDD + "-" + vMonth + "-" + vY2;
break;
default :
vData = vMonth + "\/" + vDD + "\/" + vY4;
vData = vY4vMonthvDD ;
//vData = vDD"."vMonth"."vY4;
return vData;
function Build(p_item, p_month, p_year, p_format) {
var p_WinCal = ggWinCal;
gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);
// Customize your Calendar here..
gCal.gBGColor="white";
gCal.gLinkColor="black";
gCal.gTextColor="black";
gCal.gHeaderColor="darkgreen";
// Choose appropriate show function
if (gCal.gYearly) gCal.showY();
else gCal.show();
function show_calendar() {
p_month : 0-11 for Jan-Dec; 12 for All Months.
p_year : 4-digit year
p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
p_item : Return Item.
p_item = arguments[0];
if (arguments[1] == null)
p_month = new String(gNow.getMonth());
else
p_month = arguments[1];
if (arguments[2] == "" || arguments[2] == null)
p_year = new String(gNow.getFullYear().toString());
else
p_year = arguments[2];
if (arguments[3] == null)
p_format = "MM/DD/YYYY";
else
p_format = arguments[3];
vWinCal = window.open("", "Calendar",
"width=300,height=250,status=no,resizable=no,top=100,left=100");
vWinCal.opener = self;
ggWinCal = vWinCal;
Build(p_item, p_month, p_year, p_format);
Yearly Calendar Code Starts here
function show_yearly_calendar(p_item, p_year, p_format) {
// Load the defaults..
if (p_year == null || p_year == "")
p_year = new String(gNow.getFullYear().toString());
if (p_format == null || p_format == "")
p_format = "MM/DD/YYYY";
var vWinCal = window.open("", "Calendar", "scrollbars=yes");
vWinCal.opener = self;
ggWinCal = vWinCal;
Build(p_item, null, p_year, p_format); -
I am not able to call a stored function in database
Hi,
i have created a function and when i call it every time i faced error. what is the reasone plz help me. the whole script is as under:
SQLWKS> create or replace function get_months ( v_year in number) return number
2> is
3> v_months number;
4> begin
5> v_months := v_year * 12;
6> return v_months;
7> end get_months;
Statement processed.
SQLWKS> execute get_months (10);
get_months (10);
ORA-06550: line 2, column 2:
PLS-00221: 'GET_MONTHS' is not a procedure or is undefined
ORA-06550: line 2, column 2:
PL/SQL: Statement ignored
plz suggest me, because it is a simple function.I ask because the Oracle 10g SQL Reference says that execute
can be used for either function and procedures.The SQL Reference manual says that? Where? Do you mean the SQL Plus manual?
Anyway, you can. Like this:
SQL> create or replace
2 function get_months ( v_year in number) return number is
3 begin
4 return v_year * 12;
5 end get_months;
6 /
Function created.
SQL> var vmonths number
SQL> exec :vmonths := get_months(10);
PL/SQL procedure successfully completed.
SQL> print vmonths
VMONTHS
120 -
Hi Experts,
Can anyone help me please. Is there any FM that can convert spool to HTML? Just like converting spool to PDF but only I need it in HTML. I can't use spool to PDF because I'm having problems when it comes to massive pages, but if it's only 5 pages it actually works but not with 100 pages or more. So please, if anyone can help me with spool to html. Points will be given and also to those who tried. Thanks.
AnnaHi again. Thanks for your reply. But I'm actually having a problem with the list variable. My dilemma actually is how I can transfer the jtab grabphical spool to the abaplist. Please, please help me and check what went wrong. I'm actually trying to download the graphical spool to an html format. Thanks.
TABLES: TBTCO, TBTCP, TSP01.
TYPE-POOLS: truxs.
DATA: BEGIN OF itab OCCURS 0,
sp_name TYPE tbtco-jobname,
br_code(1),
dumon(7),
sp_numb TYPE TSP01-rqident,
ofc(7),
END OF itab.
DATA: BEGIN OF btab OCCURS 5,
fld1(24),
fld2(12),
END OF btab.
DATA: htmllines TYPE TABLE OF w3html WITH HEADER LINE,
w_jtab TYPE TABLE OF ABAPLIST WITH HEADER LINE.
DATA: BEGIN OF jtab OCCURS 0,
fld1(11),
fld2(41),
fld3(21),
fld4(11),
fld5(10),
fld6(22),
fld7(72),
END OF jtab.
INITIALIZATION.
START-OF-SELECTION.
PERFORM download_html.
*& Form download_html
text
FORM download_html.
DATA: lv_file TYPE string,
lv_string TYPE string,
lt_conv TYPE truxs_t_text_data.
SORT itab BY sp_name br_code dumon.
LOOP AT itab.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = itab-sp_numb "Spool Number
TABLES
BUFFER = btab.
LOOP AT btab WHERE fld1 = 'BROKER REPORT ID'.
PERFORM get_month.
MOVE: btab-fld2+4(1) TO itab-br_code,
date TO itab-dumon.
MODIFY itab.
ENDLOOP.
Move to jtab for Conversion HTML
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = itab-sp_numb "Spool Number
TABLES
BUFFER = jtab.
****SPOOL TO HTML
CALL FUNCTION 'SAVE_LIST'
TABLES
listobject = jtab
EXCEPTIONS
list_index_invalid = 1
others = 2.
CALL FUNCTION 'WWW_LIST_TO_HTML'
TABLES
html = htmllines.
AT NEW sp_name.
CONCATENATE: p_file itab-sp_name '\' INTO p_file.
ENDAT.
AT NEW br_code.
PERFORM get_brcode.
CONCATENATE: p_file brc '\' INTO p_file.
ENDAT.
AT NEW dumon.
CONCATENATE: p_file itab-dumon '\' INTO p_file.
ENDAT.
CONCATENATE: p_file itab-ofc '.HTML' INTO p_file.
IF sy-subrc = 0.
IF p_pres EQ 'X'.
MOVE p_file TO lv_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file
filetype = 'BIN'
TABLES
data_tab = it_pdf_output.
IF sy-subrc <> 0.
MESSAGE e398(00) WITH 'Error creating file' p_file.
ELSE.
MESSAGE i398(00) WITH 'File Created' p_file.
ENDIF.
ELSE.
APPEND LINES OF it_pdf_output TO lt_conv.
IF lt_conv[] IS NOT INITIAL.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc EQ 0.
LOOP AT lt_conv INTO lv_string.
TRANSFER lv_string TO p_file.
ENDLOOP.
CLOSE DATASET p_file.
IF sy-subrc EQ 0.
MESSAGE i398(00) WITH 'File Created' p_file.
ELSE.
MESSAGE e398(00) WITH 'Error closing file' p_file.
ENDIF.
ELSE.
MESSAGE e398(00) WITH 'Error creating file' p_file.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "convert_spool_to_pdf
Edited by: Anna Bechayda on Apr 23, 2008 10:18 AM -
Fax function of HP LaserJet Enterprise 500 Color MFP M575
Hi,
I am one of users of HP LaserJet Enterprise 500 Color MFP M575.
I would like to know can I set the printer do not print my fax number and fax header on paper when I fax my document to others.
I had login as admin but I did not see where I can config it.
Thank you.
Regards,
Jimmy PunThere is no change to this problem after 6 months since the last post. Put simply, and as stated in the previous posts, there is no way to scan a document and receive the image on your PC. If you are working with graphics for any length of time or want to create an image for inclusion as an image in a document or web page using this piece of equipment will not allow you to do so.
Great shame as every other function works well - it cannot be beyond the wit of HP to include a Windows application that enables you to scan an image, receive it in the software you are using at the time (e.g. Outlook, Word, Photoshop...) and use it in your work.
HP Printers several years older than this £1000+ Enterprise printer were able to do this simple job and have done so for a great many years. Just being able to use Microsoft's Fax and Scan would be start. -
Logical Operations in SQL decode function ?
Hi,
Is it possible to do Logical Operations in SQL decode function
like
'>'
'<'
'>='
'<='
'<>'
not in
in
not null
is null
eg...
select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
from tab;
Regards,
infan
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 30, 2009 12:09 AMexample:
select col1 ,order_by,case when col1 > 10 then 0 else 1 end
from tab;
select col1 ,order_by,case when col1 <> 10 then 0 else 1 end
from tab;
select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end
from tab;As for testing for null, decode handles that by default anyway so you can have decode or case easily..
select col1 ,order_by,decode (col1, null , 0 , 1)
from tab;
select col1 ,order_by,case when col1 is null then 0 else 1 end
from tab; -
Hi,
When we use IF in calculation view with CE function the SQL engine is used.
When we remove the "IF" the CE engine is used.
Is there any alternative for if or case in CE functions?
Thanks,
AmirIs it possible to use CE_CALC for this functionality?
We are trying to use it inside projection:
res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" , "Bal_Date" AS "BALANCE_DATE", "RTCUR" ,"MAX_ZGROUP"],'"BALANCE_DATE" == 20140101');
works but:
res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" , "Bal_Date" AS "BALANCE_DATE", "RTCUR" ,"MAX_ZGROUP"], '"BALANCE_DATE" == CE_CALC( 'if(''20140101'' == ''19000101'', ''19000101'', ''20140101'')');
Doesn't work.
Thanks,
Amir -
I record my band rehearsals using the voice memo on my iPhone 5s. Then I sync to iTunes and convert file to mp3. When i sync back to my iPhone it appears in my music. So far, so good. When I use the search function in music it finds the file but won't play from tapping. I must troll through all my music songs (currently 2227 of them) to find it and then play it. Is it something to do with it still being under the genre "voice memos" or what ? Anybody help please. Thanks
iWeb is an application to create webpages with.
It used to be part of the iLife suite of applications.
iWeb has no knowledge of the internal speaker on your iPhone.
You may want to ask in the right forum. -
HP AiO Remote app will not recognize scan and copy function of HP Envy 120
Good morning! HP AiO Remote App is installed on my iPad4 and in the same WiFi network with my HP Envy 120 printer. The printer is recognized by the app and marked with a green led. When I tap on scan or copy in the app menu, it tells me that these functions were available in the app only for printers which provide these features. But HP Envy 120 has both scanner and copier. And last time it worked. Some idea what could have happened here? Thanks. UJ
Replied on: http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mobile-Printing-and-ePrintCenter/HP-AiO-Remote-will-n...
TwoPointOh
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping! -
HP AiO Remote will not recognize scan and copy function of HP Envy 120 printer
Good morning! HP AiO Remote App is installed on my iPad4 and in the same WiFi network with my HP Envy 120 printer. The printer is recognized by the app and marked with a green led. When I tap on scan or copy in the app menu, it tells me that these functions were available in the app only for printers which provide these features. But HP Envy 120 has both scanner and copier. And last time it worked. Some idea what could have happened here? Thanks. UJ
Hi UJKarl, welcome to the HP Forums. You should be able to scan from the HP AIO Remote App on your Envy 120 printer. You probably just need to power cycle the printer, iPad and router to regain proper function.
Turn off your printer with the power button. Power down the iPad by holding the sleep button down until you get the option to 'slide to power off'. Then disconnect the power cord to your router and count to about 10, and then plug it back in. Once the router comes back online, turn the printer on. When the printer comes back online (blue wi-fi light stops blinking), then power the iPad back up. Try again, and it should work.
Let me know how it turns out.
TwoPointOh
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping! -
7515 ios 8 scanning doesn't function using document feeder
My AiO remote updated on my iPad today and i have issues scanning from the scanner. The printer and tablet functions properly when scanning using the glass however when using the document feeder, AiO remote scans the sheets then before saving it says there is a problem with the scanner, check the scanner. not sure why it works with the glass and NOT with the feeder.
I am having the exact same problem. I will add that scanning from the document feeder to my Mac Book works fine. The problem with the document feeder is only whenn atttempting to use the AiO software on my iPad.
-
I want to implement thems functionality in my swing application
Hi All...
I want to implement the themes object in my swing application,How ,where to start and move that functionality,If anybody use this functionality in your program experience can u share with me.
Than to Advance
ARjun...Hi Kuldeep Chitrakar
I can do that in web intelligence. dont want that
I am replicating some of the sample report of SQL Servers in BusinessObjects XI R3.1.
One of the SQL Sever's report is of product catalogue type that gives complete information like name, category, description along with the products image etc... for each of the products.
I am trying to replicate the above said SQL Server report in Business objects XI R3.1. I am facing problem in bringing the image in to my BO report. The image resides in a table and its datatype is of varbinary(max). I don't know the exact matching while creating an object in the uiverse designer.
Here is the url link http://errorsbusinessobjectsxir3.blogspot.com/2010/10/business-objects-image-errors.html
Regards
Prasad -
Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels. Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer. I have a pretty simple system with only a few plug-ins, which are usually not in operation. I have 12GB of RAM in my Windows 7 PC. I could illustrate these problems with screen shots if you would tell me how to submit screen shots. Otherwise I will try to describe the problems in words.
The problem is clearly cumulative, growing worse as usage time passes. Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond. In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
To experiment I created a new catalog of 1100 images. After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data. (I have a screen shot to show this.) CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong. I could also send screen shots of this data.
At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR. This is not normal. I hope you can find the cause, and then the solution. If you would like to see my screen shots, tell me how to submit them.
Ollie
[email protected]Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels. Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer. I have a pretty simple system with only a few plug-ins, which are usually not in operation. I have 12GB of RAM in my Windows 7 PC. I could illustrate these problems with screen shots if you would tell me how to submit screen shots. Otherwise I will try to describe the problems in words.
The problem is clearly cumulative, growing worse as usage time passes. Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond. In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
To experiment I created a new catalog of 1100 images. After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data. (I have a screen shot to show this.) CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong. I could also send screen shots of this data.
At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR. This is not normal. I hope you can find the cause, and then the solution. If you would like to see my screen shots, tell me how to submit them.
Ollie
[email protected] -
URGENT: Function modules or BAPIs
Hi Experts,
I need function modules or BAPI to get the open items and cleared items G/L Account wise.
Useful replies will be surely awarded.Hi Chakradhar,
Check tcode : BAPI
u will get all bapis there.
Regards,
Hemant -
How to attached class or function module in FD03
Hi Guys
I want to attached CL_ATTACHMENT_LIST for retriving attachment list from fd03 please help to attached the function module in my program?
regards
Piroz
report zfir_aged_debtors no standard page heading
line-size 255.
Type group
type-pools:
slis. " ALV types
Tables
tables:
adrc, " Addresses
bsad, " Accounting: Customer secondary index (Cleared)
bsid, " Accounting: Customer secondary index (Open)
kna1, " Customer master: General data
knkk, " Customer master: Credit management
knvk. " Customer master: Contact persons
Types
types:
begin of ty_bsadbsid,
bukrs like bsad-bukrs, " Company code
kunnr like bsad-kunnr, " Customer
gjahr like bsad-gjahr, " Fiscal year
belnr like bsad-belnr, " Accounting document number
buzei like bsad-buzei, " Line item
budat like bsad-budat, " Posting date
bldat like bsad-bldat, " Document date
waers like bsad-waers, " Currency
xblnr like bsad-xblnr, " Reference
shkzg like bsad-shkzg, " Debit/credit indicator
dmbtr like bsad-dmbtr, " Amount
zfbdt like bsad-zfbdt, " Baseline date for due date
" calculation
zbd1t like bsad-zbd1t, " Cash discount days 1
zbd2t like bsad-zbd2t, " Cash discount days 2
zbd3t like bsad-zbd3t, " Net payment terms period
rebzg like bsad-rebzg, " Number of the invoice
rebzt like bsad-rebzt, " Follow on document type
end of ty_bsadbsid,
ty_it_bsadbsid type ty_bsadbsid occurs 0,
begin of ty_merged,
kunnr like kna1-kunnr, " Customer number
name1 like adrc-name1, " Name
city1 like adrc-city1, " City
post_code1 like adrc-post_code1, " Post code
street like adrc-street, " Street
house_num1 like adrc-house_num1, " House number
tel_number like adrc-tel_number, " Telephone number
fax_number like adrc-fax_number, " Fax number
namev like knvk-namev, " First name
namew like knvk-name1, " Last name
telf1 like knvk-telf1, " Telephone number
klimk like knkk-klimk, " Credit limit
skfor like knkk-skfor, " Total receivables
total like bsad-dmbtr, " Total amount
rast1 like bsad-dmbtr, " Amount period 1
rast2 like bsad-dmbtr, " Amount period 2
rast3 like bsad-dmbtr, " Amount period 3
rast4 like bsad-dmbtr, " Amount period 4
rast5 like bsad-dmbtr, " Amount period 5
rast6 like bsad-dmbtr, " Amount period 6
end of ty_merged,
ty_it_merged type ty_merged occurs 0.
Internal tables
data:
Internal table to store customer line items from BSAD and BSID
it_bsadbsid type ty_it_bsadbsid,
Internal table to store field catalog for ALV function call
it_fieldcat type slis_t_fieldcat_alv,
Internal table to store summarised data for report output
it_merged type ty_it_merged.
Structures
data:
Display variant structures
st_tvariant like disvariant,
st_variant like disvariant.
Constants
constants:
co_delim_dash type c
value '-',
co_false type c " False
value space,
co_koart_d like faede-koart " Customer account type
value 'D',
co_save_u type c " User display variant
value 'U', " saving allowed.
co_shkzg_h like bsid-shkzg " Debit/Credit indicator
value 'H', " for credit
co_shkzg_s like bsid-shkzg " Debit/Credit indicator
value 'S', " for debit
co_selected type c " Value of selected radio
value 'X', " button or checkbox
co_true type c " True
value co_selected.
Variables
data:
va_exit type c.
Selection screen definition
selection-screen: begin of block b1 with frame title text-001.
select-options:
s_kunnr for bsad-kunnr. " Customer number
parameters:
p_kkber like knkk-kkber, " Credit control area
p_pafkt like knvk-pafkt, " Contact function
p_datum like sy-datum. " Report date
selection-screen: begin of line,
comment 01(30) text-006,
position pos_low.
parameters:
rastbis1 like rfpdo1-allgrogr " Due date sorted 1
default '000',
rastbis2 like rfpdo1-allgrogr " Due date sorted 2
default '000',
rastbis3 like rfpdo1-allgrogr " Due date sorted 3
default '000',
rastbis4 like rfpdo1-allgrogr " Due date sorted 4
default '000',
rastbis5 like rfpdo1-allgrogr " Due date sorted 5
default '000'.
selection-screen: end of line.
selection-screen: end of block b1,
begin of block b2 with frame title text-002.
parameters:
p_varint like disvariant-variant. " Display variant.
selection-screen: end of block b2.
Initialisation
initialization.
Provide default periods for due date sorted list.
rastbis1 = 0.
rastbis2 = 30.
rastbis3 = 60.
rastbis4 = 90.
rastbis5 = 120.
Default report date to current.
p_datum = sy-datlo.
Default credit control area to BP01.
p_kkber = 'BP01'.
At selection screen on value request for
at selection-screen on value-request for p_varint.
Provide display variant list for this program.
call function 'REUSE_ALV_VARIANT_F4'
exporting
is_variant = st_variant
i_save = co_save_u
importing
e_exit = va_exit
es_variant = st_tvariant
exceptions
not_found = 2.
if sy-subrc eq 2.
message id sy-msgid type 'S'
number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
if va_exit eq space.
st_variant = st_tvariant.
p_varint = st_tvariant-variant.
endif.
endif.
At selection screen
at selection-screen.
Load display variant.
if not p_varint is initial.
move st_variant to st_tvariant.
move p_varint to st_tvariant-variant.
call function 'REUSE_ALV_VARIANT_EXISTENCE'
exporting
i_save = co_save_u
changing
cs_variant = st_tvariant.
st_variant = st_tvariant.
else.
clear st_variant.
st_variant-report = sy-repid.
endif.
if p_kkber is initial.
Ensure credit control area is specified.
message e000(zgen) with 'Credit control area must be specified'.
endif.
if p_pafkt is initial.
Ensure contact person function is specified.
message e000(zgen) with 'Contact person function must be specified'.
endif.
Start of selection
start-of-selection.
Extract open customer items from BSID
select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
from bsid
into table it_bsadbsid
where kunnr in s_kunnr
and budat le p_datum.
Extracct cleared customer items from BSAD
select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
from bsad
appending table it_bsadbsid
where kunnr in s_kunnr
and budat le p_datum
and augdt ge p_datum.
Ensure that items were not selected twice while getting data from the
open and cleared items tables (Only if transaction occured during
report run).
sort it_bsadbsid by bukrs belnr gjahr buzei.
delete adjacent duplicates from it_bsadbsid
comparing bukrs belnr gjahr buzei.
if it_bsadbsid[] is initial.
No data found for selection
message s001(zgen).
exit.
endif.
Merge data for report output
perform merge_data tables it_bsadbsid
it_merged.
Build field catalog
perform build_field_catalog tables it_fieldcat.
Output report via ALV
perform output_report_via_alv tables it_fieldcat
it_merged.
*& Form merge_data
text
form merge_data tables pa_it_bsadbsid type ty_it_bsadbsid
pa_it_merged type ty_it_merged.
Local work areas
data:
lwa_bsadbsid type ty_bsadbsid,
lwa_merged type ty_merged.
Local structures
data:
lst_faede like faede.
Local variables
data:
lva_daysover type i,
lva_merged_tabix like sy-tabix.
loop at pa_it_bsadbsid into lwa_bsadbsid.
Lookup merged entry for customer
clear lwa_merged.
read table pa_it_merged into lwa_merged
with key kunnr = lwa_bsadbsid-kunnr
binary search.
lva_merged_tabix = sy-tabix.
if sy-subrc ne 0.
Create new merged record for customer
lwa_merged-kunnr = lwa_bsadbsid-kunnr.
Get customer details from KNA1
clear kna1.
select single *
from kna1
where kunnr eq lwa_bsadbsid-kunnr.
Get customer address details from ADRC
clear adrc.
select single *
from adrc
where addrnumber eq kna1-adrnr
and date_from le p_datum.
lwa_merged-name1 = adrc-name1.
lwa_merged-city1 = adrc-city1.
lwa_merged-post_code1 = adrc-post_code1.
lwa_merged-street = adrc-street.
lwa_merged-house_num1 = adrc-house_num1.
lwa_merged-tel_number = adrc-tel_number.
lwa_merged-fax_number = adrc-fax_number.
Get credit limit details from KNKK
clear knkk.
select single *
from knkk
where kunnr eq lwa_bsadbsid-kunnr
and kkber eq p_kkber.
lwa_merged-klimk = knkk-klimk.
lwa_merged-skfor = knkk-skfor.
Get customer contact person details from KNVK
clear knvk.
select single *
from knvk
where kunnr eq lwa_bsadbsid-kunnr
and pafkt eq p_pafkt.
lwa_merged-namev = knvk-namev.
lwa_merged-namew = knvk-name1.
lwa_merged-telf1 = knvk-telf1.
insert lwa_merged into pa_it_merged index lva_merged_tabix.
endif.
Interpret debit/credit indicator
case lwa_bsadbsid-shkzg.
when co_shkzg_h.
Credit
lwa_bsadbsid-dmbtr = 0 - lwa_bsadbsid-dmbtr.
when co_shkzg_s.
Debit
endcase.
Perform ageing
clear lst_faede.
move-corresponding lwa_bsadbsid to lst_faede.
lst_faede-koart = co_koart_d.
call function 'DETERMINE_DUE_DATE'
exporting
i_faede = lst_faede
importing
e_faede = lst_faede
exceptions
others = 1.
lva_daysover = p_datum - lst_faede-netdt.
Accumulate total.
add lwa_bsadbsid-dmbtr to lwa_merged-total.
if lva_daysover le rastbis1.
add lwa_bsadbsid-dmbtr to lwa_merged-rast1.
else.
if lva_daysover le rastbis2 or
rastbis3 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast2.
else.
if lva_daysover le rastbis3 or
rastbis4 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast3.
else.
if lva_daysover le rastbis4 or
rastbis5 is initial.
add lwa_bsadbsid-dmbtr to lwa_merged-rast4.
else.
if lva_daysover le rastbis5.
add lwa_bsadbsid-dmbtr to lwa_merged-rast5.
else.
add lwa_bsadbsid-dmbtr to lwa_merged-rast6.
endif.
endif.
endif.
endif.
endif.
Update the merged record
modify pa_it_merged from lwa_merged index lva_merged_tabix.
endloop.
endform. " merge_data
*& Form build_field_catalog
text
form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
Local work areas
data:
lwa_fieldcat type slis_fieldcat_alv.
--WG1K903216: Start Insert-
data: v_datum type datum,
v_mdmth type datum,
v_datxt type string,
v_noday type i.
--WG1K903216: End Insert---
refresh pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'KUNNR'.
lwa_fieldcat-ref_tabname = 'KNA1'.
lwa_fieldcat-ref_fieldname = 'KUNNR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '1'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAME1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'NAME1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '2'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'CITY1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'CITY1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '3'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'POST_CODE1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'POST_CODE1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '4'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'STREET'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'STREET'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '5'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'HOUSE_NUM1'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'HOUSE_NUM1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '6'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TEL_NUMBER'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'TEL_NUMBER'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '7'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'FAX_NUMBER'.
lwa_fieldcat-ref_tabname = 'ADRC'.
lwa_fieldcat-ref_fieldname = 'FAX_NUMBER'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '8'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAMEV'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'NAMEV'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '9'.
lwa_fieldcat-seltext_l = 'Contact first name'.
lwa_fieldcat-seltext_m = 'Contact Fname'.
lwa_fieldcat-seltext_s = 'Ctct Fname'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'NAMEW'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'NAME1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '10'.
lwa_fieldcat-seltext_l = 'Contact last name'.
lwa_fieldcat-seltext_m = 'Contact Lname'.
lwa_fieldcat-seltext_s = 'Ctxt Lname'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TELF1'.
lwa_fieldcat-ref_tabname = 'KNVK'.
lwa_fieldcat-ref_fieldname = 'TELF1'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '11'.
lwa_fieldcat-seltext_l = 'Contact phone no.'.
lwa_fieldcat-seltext_m = 'Contact phone'.
lwa_fieldcat-seltext_s = 'Ctct Phne'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'KLIMK'.
lwa_fieldcat-ref_tabname = 'KNKK'.
lwa_fieldcat-ref_fieldname = 'KLIMK'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '12'.
lwa_fieldcat-seltext_l = 'Credit limit'.
lwa_fieldcat-seltext_m = 'Credit limit'.
lwa_fieldcat-seltext_s = 'Crdt limit'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'SKFOR'.
lwa_fieldcat-ref_tabname = 'KNKK'.
lwa_fieldcat-ref_fieldname = 'SKFOR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '13'.
lwa_fieldcat-seltext_l = 'Credit used'.
lwa_fieldcat-seltext_m = 'Credit used'.
lwa_fieldcat-seltext_s = 'Crdt used'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'TOTAL'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '14'.
lwa_fieldcat-seltext_l = 'Total'.
lwa_fieldcat-seltext_m = 'Total'.
lwa_fieldcat-seltext_s = 'Total'.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST1'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '15'.
--WG1K903216: Start Delete-
concatenate '<'
rastbis2
into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis2.
Always use the middle of the report month as a heading reference date.
concatenate p_datum+0(6) '15' into v_mdmth.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '+'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST2'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '16'.
--WG1K903216: Start Delete-
concatenate rastbis1
rastbis2
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis1.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '+'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST3'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '17'.
--WG1K903216: Start Delete-
concatenate rastbis2
rastbis3
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis2.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST4'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '18'.
--WG1K903216: Start Delete-
concatenate rastbis3
rastbis4
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis3.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST5'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '19'.
--WG1K903216: Start Delete-
concatenate rastbis4
rastbis5
into lwa_fieldcat-seltext_l
separated by co_delim_dash.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis4.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
clear lwa_fieldcat.
lwa_fieldcat-tabname = 'PA_IT_MERGED'.
lwa_fieldcat-fieldname = 'RAST6'.
lwa_fieldcat-ref_tabname = 'BSAD'.
lwa_fieldcat-ref_fieldname = 'DMBTR'.
lwa_fieldcat-row_pos = '1'.
lwa_fieldcat-col_pos = '20'.
--WG1K903216: Start Delete-
concatenate '>'
rastbis5
into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Delete---
--WG1K903216: Start Insert-
clear: v_datum,
v_datxt.
v_noday = rastbis5.
call function 'ZWAG_DATE_CALCULATOR'
exporting i_datum = v_mdmth
i_noday = v_noday
i_oprnd = '-'
importing e_datum = v_datum
exceptions invalid_operand = 1.
call function 'ZWAG_END_MONTH'
exporting i_datum = v_datum
importing e_datum = v_datum
e_datxt = v_datxt
exceptions invalid_date = 1.
concatenate 'Due By' v_datxt into lwa_fieldcat-seltext_l
separated by space.
--WG1K903216: End Insert---
lwa_fieldcat-seltext_m = lwa_fieldcat-seltext_l.
lwa_fieldcat-seltext_s = lwa_fieldcat-seltext_l.
lwa_fieldcat-ddictxt = 'L'.
append lwa_fieldcat to pa_it_fieldcat.
endform. " build_field_catalog
*& Form output_report_via_alv
text
form output_report_via_alv
tables pa_it_fieldcat type slis_t_fieldcat_alv
pa_it_merged type ty_it_merged.
Local variables
data:
lva_repid like sy-repid,
lva_formname type slis_formname.
lva_repid = sy-repid.
lva_formname = 'USER_COMMAND'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = lva_repid
i_callback_user_command = lva_formname
i_save = 'A'
is_variant = st_variant
it_fieldcat = pa_it_fieldcat[]
tables
t_outtab = pa_it_merged
exceptions
program_error = 1
others = 2.
endform. " output_report_via_alvHi shiva
Thanks for your help,
Can you check this coding and revert me back ASAP Please.
REPORT BDS_GOS_CONNECTION.
DATA : logical_system LIKE BAPIBDS01-log_system.
CLASSNAME LIKE BAPIBDS01-CLASSNAME
OBJKEY LIKE SWOTOBJID-objkey.
PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
pa_class like BPIBDS01-CLASSNAME,
pa_objkey like swotobjidobjkey.
AT SELECTION-SCREEN.
CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
EXPORTING
bor_id = bor_id
IMPORTING
logical_sytem = pa_lo_sys.
classname = pa_class.
objkey = pa_objkey.
EXCEPTIONS
no_objects_found = 1
internal_error = 2
internal_gos_error = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
clear v_attno1.
i_object1-typeid = 'BUS2012'.
i_object1-catid = 'BO'.
i_object1-instid = i_yItem-docno.
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
CALL METHOD cl_gos_attachment_query=>count_for_object
EXPORTING
is_object = object
ip_arl = space
RECEIVING
rt_stat = lt_stat.
READ TABLE lt_stat INDEX 1 into ls_stat.
count = ls_stat-counter.
*The object has to be a concatenation of your document, like this:
CONCATENATE object-instid tab-gjahr INTO object-instid.
ELSE.
CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
object-instid.
ENDIF.
Maybe you are looking for
-
Keyboard removal to install memory
I have a Satellite M105-S3021, to which I want to add RAM. I purchases two 2GB modules and would like to install them myself. I've searched the web site, trying to find instructions on how to reach the other memory slot (which I believe is under the
-
Can't open or save a file in Adobe Photoshop CS3
Good day! I'm having this problem: - When I open an image in Photoshop CS3, an open box appears and I have selected my image, but when I click the Open button, an error message comes out that says "could not continue with the open command because two
-
Satellite P775 getting stuck on extensive disk usage
Hello I have a strange problem on my Toshiba Satellite P775 laptop with Windows 7. From time to time, the laptop is starting slow and heavy I/O operations (I can see it via the disk monitoring indicator). Windows does not crash, but the heavy I/O mak
-
PS CC 2014: Custom Workspaces Not Saving Palette Positions
I generally have two Custom Workspaces: one for when I am working on a single monitor, and one when working with dual monitors. Unfortunately, when I create the second Custom Workspace, it saves the palette position to both of the workspaces. If I tr
-
Do we have a ROWID or equivalent in HANA ?
Hi, We are in the process of putting our HR data into HANA. The existing Oracle system uses a lot of analytical functions like LEAD, LAG, FIRST_VALUE to manipulate data. I m manually coding for these functions which is making my life really tough. My