How to use else if in JSTL
Can any one tell me ,
How to use else if in JSTL,
For example,
if(a > b){
// code block
}else if(b > c){
// code block
}else{
// code block
Shall i use like following,
<c:choose>
<c:when test=' "${ a > b }" '>
</c:when>
<c:when test=' "${ b > c }" '>
</c:when>
<c :otherwise>
</c:otherwise>
</c:choose>
this JSTL code is correct or not?..
Thanks in advance
Deenu
Deenu wrote:
<c:choose>
<c:when test=' "${ a > b }" '>
</c:when>
<c:when test=' "${ b > c }" '>
</c:when>
<c :otherwise>
</c:otherwise>
</c:choose>
this JSTL code is correct or not?..Remove the single quotes and it's fine.
It is not clear if it is applicable on your functional requirement, but it is good to know that EL supports conditional statements.
Similar Messages
-
How to use this method in JSTL?help me please!
I know I can use "<C:set >" like as
<c:set var="clabel3" value="${portalCustomizeBean.portalPage}"/> ,
but now I want to use one method of portalCustomizeBean object not a attribute of it !!!!!
who would tell me how to use?
this is wrong in my code:
<c:set var="clabel" value="${portalCustomizeBean.currentPageLabel}"/>
<c:set var="clabel3" value="${portalCustomizeBean.toEntitiesExceptSpaceEscape(clabel)}"/>
but how to use "toEntitiesExceptSpaceEscape" method in JSTL?????Why can't you just assign the method's return value to a variable and then print that? A bit of scriptlet code will do the trick. (As much as we all hate to use scriptlet code.)
I believe you'll be able to do what you want in the 1.1 standard JSTL, but for now this will suffice. - MOD -
How to use Java Beans In JSTL?
Hi
I want to know how to use Java bean in JSTL
please explain this with giving any one example.
Thanks-
SwapneelA bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.
-
How to use sql tag of jstl for inserting data
hello
I want to insert the data in to oracle through jsp using standard sql tags of jstl please help me1) Go to www.google.com.
2) Enter in that input field "jstl sql tag tutorial" (assuming you want to learn the JSTL SQL tag library).
3) Hit that search button.
4) Explore the results. One of them is http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL7.html -
How to use JSTL varriable in to XML
1. how to use JSTL varriable into Xml Tag.
for example :
java value I am passing to XML.
<eztag:companytag pgm_sname="<%= strpgm_name%>" dbase="<%= strd%>"
dbpass="<%= strp%>" dburl="<%= stru%>" session="<%= session%>" />
After modified in JSTL
<eztag:companytag pgm_sname="${pgm_name}" dbase="${strd}"
dbpass="${strp}" dburl="${stru}" session="${session}" />
but its Not working. How to use this
2.How to use ArrayLIst in JSTL
For example
IN Java scriplet code in JSP
<%for(int i=0;i<alist.size();i++) {
String str = String.valueOf(alist.get(i));
String str1 = String.valueOf(alist.get(i+1));
%>
<TD>STR - <%=str%> </TD>
<TD>STR1 - <%=str1%> </TD>
<% } %>
This code How to Use in JSTL.
thanks in advancethanks for reply
But in this article it describes how to passing the value of function.
I need how to assign the JSTL varriable to xml tag attribute.
for example
In my TLD File
<tag>
<name>companytag</name>
<tag-class>bas.CompanyTag</tag-class>
<attribute>
<name>dbase</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>dbpass</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>dburl</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>pgm_sname</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>session</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
</tag>
Html code
old code :
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
<eztag:companytag pgm_sname="<%= strpgm_name%>" dbase="<%= strd%>"
dbpass="<%= strp%>" dburl="<%= stru%>" session="<%= session%>" />
After modified in JSTL
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
<eztag:companytag pgm_sname="${pgm_name}" dbase="${strd}"
dbpass="${strp}" dburl="${stru}" session="${session}" />
but its Not working. How to use this
the "eztag" and "companytag" are the customtag. these tages available in eztaglib.tld file. I am passing the value through XML Tag.
Please suggest me . how to use.
is there any article describes how to pass jstl varriable to XML Tag attribute.
thanks in advance -
How to use JSTL create a dynamic table according to a database???
How to use JSTL create a dynamic table according to a database in a web page? Who can help me? Thanks.
How to use JSTL create a dynamic table according to a
database in a web page? Who can help me? Thanks.???
Could you rephrase your quesion?
Do you want to display records by reading from a table in DB? -
Need help with help pse4 not supported by adobe. how to do topics not available and I have never used any thing like this. Help says there is a download but have not been able to get it. What's a rookie to do ? Is there somewhere I can go to find out how to use PSE4?
The internet is overflowing with tutorials on PSE. Just google what you want and include Photoshop Elements 4 as part of your search term, or go to the library and they may have several different books on PSE 4. For PSE 4, you won't find a mac specific book, but that doesn't matter because the editor is the same on either program. Just substitute Command for Ctrl and Option for Alt in the keystrokes, and ignore anything about the organizer.
Some popular sites for learning elements:
http://www.photoshopelementsuser.com/
lynda.com
eclecticacademy.com
youtube has a lot of video tutorials, too. -
Can't figure out how to use home sharing
Since the latest couple iTunes updates, my family and I can not figure out how to use home sharing. Everyone in our household has their own iTunes, and for a long time we would just share our music through home sharing. But with the updates, so much has changed that we can no longer figure out how to use it.
I have a lot of purchased albums on another laptop in the house, that im trying to move it all over to my own iTunes, and I have spent a long time searching the internet, and everything. And I just can't figure out how to do it. So.... how does it work now? I would really like to get these albums from my moms iTunes, onto mine. I would hate to have to buy them all over again.
If anyone is able to help me out here, that would be great! Thanks!The problem im having is that after I am in another library through home sharing, I can't figure out how to select an album and import it to my library. They used to have it set up so that you just highlight all of the songs you want, and then all you had to do was click import. Now I don't even see an import button, or anything else like it. So im lost... I don't know if it's something im doing wrong, or if our home sharing system just isn't working properly.
Thanks for the help. -
How to use multiple ipods on one account
I have an Ipod classic and just bought my sons two nano's how do I use these on the same account without changing my account info?
Take a look here:
How to use multiple iPods with one computer
Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Discussions page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums, in the User Tips Library and in the Apple Knowledge Base before you post a question.
Regards. -
How to use if condition in XML Publisher Desk Top
Hi..,
How to use if condition in XML Publisher desk Top.
Please guide me.
Thanks,
Suresh.What kind of condition you want to use?
You can use Condition like this:
<?xdofx:if condition then value1
else if condition then Value2
else Value3
end if?>
Please go thru XML Publisher User Guide.
Thanks
Ravi
[email protected] -
How to use a regural expression to get all digit from a string.
Hi All,
Do you know how to use regural expression to get all digits from the following string via ABAP program?
"'Log Attributes 0 ( 0 ) ( 10 % Available )"
Thanks,
AndrewHi,
Try the code mentioned below:
DATA: STR_LEN LIKE SY-FDPOS,
RSTR_LEN LIKE SY-FDPOS,
OFF LIKE SY-FDPOS.
DATA: IDX LIKE SY-FDPOS, "mn B20K054003
CL LIKE SY-FDPOS. "mn B20K054003
DATA: RSTRING(40).
DATA: STRING(40). " value 'A,N,I,L'.
FIELD-SYMBOLS: <NLS_CHAR>. "mn B20K054003
MOVE I_REGUH-ZNME1 TO STRING.
MOVE SPACE TO RSTRING.
STR_LEN = STRLEN( STRING ).
DESCRIBE FIELD RSTRING LENGTH RSTR_LEN.
IF RSTR_LEN < STR_LEN. RAISE TOO_SMALL. ENDIF.
WHILE IDX < STR_LEN. "mn B20K054003
ASSIGN STRING+IDX(*) TO <NLS_CHAR>. "mn B20K054003
IF SY-LANGU EQ '2'. "mn B20K054003
CALL FUNCTION 'NLS_THAI_CHARLEN' "mn B20K054003
EXPORTING "mn B20K054003
THAI_STRING = <NLS_CHAR> "mn B20K054003
CHANGING "mn B20K054003
THAI_CHARLEN = CL. "mn B20K054003
ELSE. "mn B20K054003
CL = CHARLEN( <NLS_CHAR> ). "mn B20K054003
ENDIF. "mn B20K054003
IF IDX NE 0. "mn B20K054003
SHIFT RSTRING RIGHT BY CL PLACES."mn B20K054003
ENDIF. "mn B20K054003
RSTRING+0(CL) = STRING+IDX(CL). "mn B20K054003
IDX = IDX + CL. "mn B20K054003
ENDWHILE. "mn B20K054003
Regds,
Anil
Edited by: Matt on Jul 1, 2009 9:36 AM -added code tags -
Re: [SunONE-JATO] Re: How to use a tiled view without a model
I'm not sure what is different for you now. You still parse the string
and put it into a data structure. Before the data structure was a
vector, in JATO its just a model with a "hidden" data structure (a hash
map).
MVC only really comes into play when you talk about where your write
this code, and where the data structure is being stored. So really, JATO
takes care of half of the MVC'ness of it all (where the data is store).
You just decide where to be the code to populate the model.
Make sense?
Is there something different required of you in JATO in this scenario
that I am not grasping?
c
Hoskins, John D. wrote:
Thanks for the feedback.
The problem I was solving involved a single string, which contained
delimited subsets of information.
The string looked like
this:"time|analyst|description|time|analyst|description|..."
In ND, I parsed it apart into it's components (time vector, analyst vector,
description vector), populated the repeated.
With JATO, how would I make a model for something that doesn't have a
database component like this?
I'm pretty new to this MVC thing, so bear with me.
John D. Hoskins
Telephone & Data Systems
Application Development & Support
Voice: 608.664.8263
Fax: 608.664.8288
Email: john.hoskins@t...
-----Original Message-----
From: Craig V. Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098031198039130252055210">craig.conover@s...</a>]
Sent: 6/26/2002 3.22 PM
Subject: Re: [SunONE-JATO] Re: How to use a tiled view without a model
I guess the only thing "weird" (for lack of a better term) about what
you are doing is that your are populating the model on the "display
cycle". Typically, the cycle goes like this:
Request -> populate model -> update data store -> retrieve data to
populate model -> display data
some of the above steps are optional but hopefully you get the point I
am making.
So what you are doing is:
Request -> populate model/display data
If it works for you, then it's not necessarilly wrong. But I would
probably have my model populated before I forwarded to the target
(displaying view bean) or at a minimum, in the begin display event of
the view bean or the tiled view, but not during the iteration of the
tiled view.
c
jhoskins wrote:
Craig,
Thanks for the pointers. I ended up doing something else. I set the
models setSize() method to set the max size, and as the tiles fields
iterated, populated the value from some vectors I had the data in
already. Is this solution fraught with peril and will ultimately fail,
or should I try your way?
John
--- Craig V. Conover wrote:
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspCraig,
Thanks for the pointers. I ended up doing something else. I set the
models setSize() method to set the max size, and as the tiles fields
iterated, populated the value from some vectors I had the data in
already. Is this solution fraught with peril and will ultimately fail,
or should I try your way?
John
--- "Craig V. Conover" wrote:
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp -
How to use Change doc Function Module?
Fn mod:ZSUBTESTCHG_WRITE_DOCUMENT
Import parameters Value
OBJECTID ZSUBTESTCHG
TCODE SE37
UTIME 00:00:00
UDATE 09.03.2009
USERNAME 'TESTUSER'
PLANNED_CHANGE_NUMBER
OBJECT_CHANGE_INDICATOR I
PLANNED_OR_REAL_CHANGES R
NO_CHANGE_POINTERS
UPD_ICDTXT_ZSUBTESTCHG I
N_ZSUBTEST 2 TEST
O_ZSUBTEST 2 TEST
UPD_ZSUBTEST I
Tables Value
ICDTXT_ZSUBTESTCHG 0 Entries
I have a ztable 'ZSUBTEST' with 2 fields DEPTID and DEPNAME and ticked "change document" for data element.
I have created the above change doc write fn module. I am trying to insert a new reocrd into table.
How to use ZSUBTESTCHG_WRITE_DOCUMENT so that even if i try to change an existing record in ztable the old and new values for a particulat ztable will be filled in CDPOS Table.
Would appreciate if you can suggest me how to use in1) Update and 2) Insert scenarios.
Thanks,
Subbahi check this,
Types Declaration***
types: BEGIN OF X_audit,
Field of ZAUDIT TABLE OR a custom created table------
END OF X_audit.
Data Declaration***
Data: w_newvalues type X_audit,
w_oldvalues type X_audit.
DATA: BEGIN OF t_cdtxt OCCURS 0.
INCLUDE STRUCTURE cdtxt.
DATA: END OF t_cdtxt.
DATA: l_tcode type cdhdr-tcode ,
l_time type cdhdr-utime,
l_usnam type cdhdr-username,
l_date type cdhdr-udate.
**Constants****
CONSTANTS : l_objectid TYPE cdhdr-objectid VALUE 'ZAUDIT_CD'.
Initialization.
Clear: l_tcode,l_time, l_usnam, l_date.
Clear: w_newvalues, w_oldvalues.
**Start-Of-Selection**
Start-of-selection.
*Populating w_oldvalues workarea with old values from the table
Select single * from zaudit_t
Into w_oldvalues
Where belnr eq belnr_1
And gjahr eq gjahr_1
And bukrs eq bukrs_1. u201C where, belnr_1, gjahr_1, bukrs_1 are the fields on selection screen.
here we are populating w_newvalues workarea with new values
W_newvalues-f1 = w_oldvalues-f1
f2 = u2018XXXXXXXu2019 -
f3 = u2018YYYYYYYu2019
f4 = u2018ZZZZZZZu2019
l_tcode = sy-tcode.
l_time = sy-uzeit.
l_usnam = sy-uname.
l_date = sy-datum.
modify the table with new values***
MODIFY zaudit_t FROM w_submit.
IF sy-subrc EQ 0.
MESSAGE 'Document Updated' TYPE 'S'.
call function 'ZAUDIT_CD1_WRITE_DOCUMENT'
exporting
objectid = l_objectid
tcode = l_tcode
utime = l_time
udate = l_date
username = l_usnam
PLANNED_CHANGE_NUMBER = ' '
object_change_indicator = 'U' u201CU-update, I-insert, D-delete
PLANNED_OR_REAL_CHANGES = ' '
NO_CHANGE_POINTERS = ' '
upd_icdtxt_zaudit_cd = 'U'
n_zaudit_t = w_newvalues u201Cpass the work area containing new values
o_zaudit_t = w_oldvalues u201Cpass the work area containing old values
upd_zaudit_t = 'U' u201C this parameter gives the values in the columns(new value, old value and changed field name) of table CDPOS.
tables
icdtxt_zaudit_cd = t_cdtxt
ELSE.
MESSAGE 'Document Not Updated' TYPE 'S'.
ENDIF. u201CIF sy-subrc EQ 0. -
How to use tree tables with CRUD operation for begineers ADF 11g
This is Friday night call for help.
This is only few sample ressources on the web for tree table and only one with CRUD operation.
I used this one http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html because this is the only one that address CRUD.
And it is shaky. Deletion works fine but insertion not very well. This is working using custom code provided below.
Depending if the user selection in the tree, the code insert from the master node to the children node.
Any other options because it is not working well.
Also where Oracle describes how to use the row, rowset, itorator API? This is really hard to understand like almost if we should not use it.
then if not how can I insert in tree with two nodes and insert in the parent or children depending the users selection.
Lately I 'been posting questions on this forum with no response. This hurts. I understand developers cannot spend their time on this but People from Oracle, please help. We pay licenses...
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "model.DepartmentsView";
final String empViewDefName = "model.EmployeesView";
if (ri != null && selectedNodeKey != null) {
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
Row foundRow = found[0];
String nodeDefname =
foundRow.getStructureDef().getDefFullName();
if (nodeDefname.equals(deptViewDefName)) {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
parents.insertRow(childrow);
} else {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
childrow.setAttribute("DepartmentId",
foundRow.getAttribute("DepartmentId"));
parents.insertRow(childrow);
} else {
System.out.println("Node not Found for " + selectedNodeKey);
}I am looking for a sample that describe how to design a jsf page with a tree table.
So you have Department and employees. In the tree first comes Department and if you click the node you see the employees assigned to this department.
I need to be able to insert a new department or a new employee from the tree table by clicking on a insert button in the panel collection toolbar depending on user selection in the tree.
I got part of it working but not good enough.
By problem is the get insertion working
I have a createChildren method in my AM implementation that get in input a RowIterator and selected node key.
To goal is to create new records depending of the user selection and the input parameters get populated by the binding like this:
#{backing_treeSampleBean.selectedNodeRowIterator} #{backing_TreeSampleBean.selectedNodeRowkey} via method binding with parameters.
Is it the right approach?
First to be able to insert a parent record, I select nothing in the tree and ri and selectedNodeKey comes to null
we run this code
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
//ViewObjectImpl vo = getDepartmentsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
A new blank entry appears in the parent node and we enter a value.
The the problem starts when we want to add a child to this parent.
We select the created parent and press the insert button, this code get executed
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
childRows.insertRow(childrow);
But the new entry does not appear, it is almost like it would be created for a different parent because this is a mandatory field that is not feel in yet and the interface complaints of a missing value. It is created somewhere just not a the right place... This is my guess.
Do you see something wrong with the code?
The full code og my create children method is there below
I am using jdeveloper 11.1.1.3.0 any issues with tree table to know about with this version?
Thanks for your help
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidaySchedExceptionsView";
final String empViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidayExceptionDatesView";
if (ri != null && selectedNodeKey != null) {
// last row
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
// foundRow is the row selected
Row foundRow = found[0];
// The row selected can be the parent node or the child node
String nodeDefname = foundRow.getStructureDef().getDefFullName();
// if parent row
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
//works but we try to resolve the creation of a parent
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
//childrow.setAttribute("HolidayDate", new java.util.Date().getDate());
System.out.println("insert child row from master");
childRows.insertRow(childrow);
} else
//RowSet ParentRow = (RowSet)foundRow.getAttribute("SchHolidaySchedExceptionsView");
//RowSet childRows = (RowSet)ParentRow.first().getAttribute("SchHolidayExceptionDatesView");
Row childrow = ri.createRow();
System.out.println("insert child row from child ");
} else {
System.out.println("Node not Found for " + selectedNodeKey);
} else {
System.out.println(" param null try creating for first row : " +
ri + " * " + selectedNodeKey);
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
} -
How to use pf-status u2018menuu2019 in ALV report ?
Hi Friends,
How to use pf-status u2018menuu2019 in ALV report ?
I want to use back button ( F3). whenever press it should show
another report.
I used subroutine
form SUB_ERROR_OUTPUT USING RT_EXTAB TYPE SLIS_T_EXTAB .
SET PF-STATUS 'ZMENU' EXCLUDING RT_EXTAB. u201C( the button name is u201C back u201C)
CASE SY-UCOMM.
*WHEN '&F03'.
WHEN 'BACK'
( my coding is there ).
endcase.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PF_STATUS_SET = 'SUB_ERROR_OUTPUT'
but it is executing, working the back button but not showing another report .
any other procedure to use back button in alv report ?
plz any idea .
For correct answer reword most.
Thanking you.Purchase day Book .
Data to be down loaded / printed for EDP dept. CGL.
CGL - Requirement .
WRITTEN BY : ADI.****
*CONSULTANT : SANJAY JAJOO..
AS PER DP REQUIREMENT.
-CHANGED BY : KRISHNA MOHAN (15/01/2002)--
-CHANGE REQ BY : JAJU S--
-DESCRIPTION : SUMMRY BY TAX CODE WISE & GL CODE WISE--
---MODIFIED LINES: -
---CHANGED BY : -
---CHANGE REQ BY : -
---DESCRIPTION : -
---MODIFIED LINES: -
*---changed by : sanjay jajoo on 23/08
*---changed req by: Ranka
*---Description : Inserting Range of period as sel field
changed by : krishna mohan
func. consultant: sanjay jajoo
REPORT ZMMPURDB MESSAGE-ID 00
LINE-SIZE 255
LINE-COUNT 60
NO STANDARD PAGE HEADING .
TABLES : MKPF , MSEG ,SKAT,
EKKO , EKPO , EKBE ,
BSEG , BKPF , BSET ,
T009B , T001 , T007S ,
T001W , T001K ,LFA1.
******Table deactivated on 30/8/2000------jaju
*tables : zcgltaxatn .
DATA : ZFILE1(65) VALUE '/DOWNLOAD/'.
DATA : ZFILE2(65) .
DATA : ZFILE(30) TYPE C VALUE '/DOWNLOAD/'.
DATA : ZMON(2).
DATA : ZTOTAL(11) TYPE N.
DATA: ZTOT1 TYPE P DECIMALS 2.
DATA: ZTXT LIKE SKAT-TXT50.
TYPES: BEGIN OF COMPANY ,
HKONT LIKE BSEG-HKONT,
TOTAL LIKE BSEG-DMBTR,
END OF COMPANY.
DATA: COMP TYPE COMPANY,
COMPTAB TYPE HASHED TABLE OF COMPANY WITH UNIQUE KEY HKONT
WITH HEADER LINE.
DATA : NEXT LIKE BSEG-BUZEI. "A.A. (28/03/2000)
DATA : DOC LIKE BSEG-BELNR. "A.A. (28/03/2000)
DATA S_GSBER.
DATA: CTR TYPE I.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-B01.
PARAMETERS : T_BUKRS LIKE T001-BUKRS OBLIGATORY MEMORY ID BUK .
***********CH--ID- ADI- 29 / 09 / 1999
SELECT-OPTIONS : ZGL FOR BSEG-HKONT OBLIGATORY.
***********CH--ID- ADI- 29 / 09 / 1999
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(9) TEXT-C01 .
PARAMETERS : POPER RADIOBUTTON GROUP RAD1 .
SELECTION-SCREEN COMMENT 13(7) TEXT-C02 .
PARAMETERS : MONTH RADIOBUTTON GROUP RAD1 .
SELECTION-SCREEN COMMENT 23(8) TEXT-C03 .
SELECTION-SCREEN POSITION 33 .
commented on 22/08 sanjay jajoo
*PARAMETERS : T_MONAT LIKE BKPF-MONAT .
SELECTION-SCREEN END OF LINE.
PARAMETERS : T_GJAHR LIKE BKPF-GJAHR OBLIGATORY .
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS : S_DOCTYP FOR BKPF-BLART,
S_VENDOR FOR LFA1-LIFNR MATCHCODE OBJECT KRED,
S_MATNR FOR BSEG-MATNR NO-DISPLAY,
T_BUDAT FOR MKPF-BUDAT NO-EXTENSION MODIF ID DAT,
p_gsber FOR bseg-gsber OBLIGATORY,
P_GSBER FOR BSEG-GSBER,
mod starts for inserting range of period - sanjay jajoo
T_MONAT FOR BKPF-MONAT OBLIGATORY.
mod ends
*SELECT-OPTIONS: br_blart FOR mkpf-blart.
*Select-options: br_blart for bkpf-blart.
SELECTION-SCREEN END OF BLOCK B1 .
Start of Delete by B.Elan on 23/12/2005
*PARAMETERS : errors AS CHECKBOX .
*PARAMETERS : summary AS CHECKBOX .
*PARAMETERS : nodetail AS CHECKBOX .
**selection-screen skip 2.
*SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-b03. "<<<
*Add
*PARAMETER : stax_reg RADIOBUTTON GROUP rad2 . "<<<
*Add
*PARAMETER : pur_db RADIOBUTTON GROUP rad2 . "<<<
*Add
*SELECTION-SCREEN END OF BLOCK b3 . "<<< Add
*SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
*PARAMETERS : display RADIOBUTTON GROUP grp1 ,
dload RADIOBUTTON GROUP grp1.
*PARAMETERS : fname1 LIKE rlgrap-filename .
*DATA : zdoc LIKE bseg-belnr.
*DATA : fname LIKE rlgrap-filename.
*SELECTION-SCREEN END OF BLOCK b2 .
End of Delete by B.Elan on 23/12/2005
Start of Insert by B.Elan on 23/12/2005
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
PARAMETER : PUR_DB RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 10(25) TEXT-C06.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
PARAMETERS : MAT_SM RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 10(25) TEXT-C04.
SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
PARAMETERS : VEN_SM RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 44(20) TEXT-C05.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
PARAMETERS : MAT_DT RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 10(25) TEXT-C07.
SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
PARAMETERS : VEN_DT RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN COMMENT 44(20) TEXT-C08.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
End of Insert by B.Elan on 23/12/2005
Hard coded values used in the program
added by krishna mohan on 09/02/02
DATA : BEGIN OF IT_MSEG OCCURS 0,
BELNR LIKE BSEG-BELNR,
MBLNR LIKE MSEG-MBLNR,
EBELN LIKE BSEG-EBELN,
EBELP LIKE BSEG-EBELP,
END OF IT_MSEG.
mod ends
Start of Insert by B.Elan on 23/12/2005
*--vikky
DATA : BEGIN OF IT_FINAL OCCURS 0,
MATNR LIKE MARA-MATNR,
BLART LIKE BKPF-BLART, " doctype
BELNR LIKE BSEG-BELNR, "sr - nO 10
XBLNR LIKE BKPF-XBLNR , " Bill-no 16
NAME1_VENDOR(25),
"lfa1-name1, " Vendor Name 35
HKONT LIKE BSEG-HKONT , " Alloc-cd 10
MWSKZ LIKE EKPO-MWSKZ , " St-cd 2
BUDAT LIKE BKPF-BUDAT , " Bill-dt 10
DUE_DATE LIKE BSEG-ZFBDT , " Due date 10
PON LIKE EKKO-EBELN , " PON 10
MAKTX LIKE MAKT-MAKTX, "Material text 40
MBLNR LIKE MSEG-MBLNR,
QTY(8) TYPE P DECIMALS 2 , "Qty 11
RATE(9) TYPE P DECIMALS 2 , "Rate11
DISCOUNT(7) TYPE P DECIMALS 2, "DISCOUNT 11
PROD-AMT(9) TYPE P DECIMALS 2,
"AMOUNT 13
EXCISE(8) TYPE P DECIMALS 2 , "eXCISE TAX 11
SALES(5) TYPE P DECIMALS 2 , "SALES TAX 11
FREIGHT(9) TYPE P DECIMALS 2, "FREIGHT 11
OTHERS(11) TYPE P DECIMALS 2, " OTHERS 11
TOTAL(9) TYPE P DECIMALS 2, "TOTAL 17
END OF IT_FINAL.
*DATA : BEGIN OF IT_FINAL OCCURS 0,
MATNR LIKE MARA-MATNR,
BLART LIKE BKPF-BLART, " doctype
BELNR LIKE BSEG-BELNR, "sr - nO 10
XBLNR LIKE BKPF-XBLNR , " Bill-no 16
NAME1_VENDOR(25),
"lfa1-name1, " Vendor Name 35
HKONT LIKE BSEG-HKONT , " Alloc-cd 10
MWSKZ LIKE EKPO-MWSKZ , " St-cd 2
BUDAT LIKE BKPF-BUDAT , " Bill-dt 10
DUE_DATE LIKE BSEG-ZFBDT , " Due date 10
PON LIKE EKKO-EBELN , " PON 10
MAKTX LIKE MAKT-MAKTX, "Material text 40
MBLNR LIKE MSEG-MBLNR,
QTY(13) TYPE P DECIMALS 2 , "Qty 11
RATE(13) TYPE P DECIMALS 2 , "Rate 11
DISCOUNT(13) TYPE P DECIMALS 2, "DISCOUNT 11
PROD-AMT(13) TYPE P DECIMALS 2,
"AMOUNT 13
EXCISE(13) TYPE P DECIMALS 2 , "eXCISE TAX 11
SALES(13) TYPE P DECIMALS 2 , "SALES TAX 11
FREIGHT(13) TYPE P DECIMALS 2, "FREIGHT 11
OTHERS(13) TYPE P DECIMALS 2, " OTHERS 11
TOTAL(13) TYPE P DECIMALS 2, "TOTAL 17
END OF IT_FINAL.
*--vikky
DATA : BEGIN OF IT_FINAL_VN OCCURS 0,
NAME1_VENDOR(25),
"lfa1-name1, " Vendor Name 35
MATNR LIKE MARA-MATNR,
BLART LIKE BKPF-BLART, " doctype
BELNR LIKE BSEG-BELNR, "sr - nO 10
XBLNR LIKE BKPF-XBLNR , " Bill-no 16
HKONT LIKE BSEG-HKONT , " Alloc-cd 10
MWSKZ LIKE EKPO-MWSKZ , " St-cd 2
BUDAT LIKE BKPF-BUDAT , " Bill-dt 10
DUE_DATE LIKE BSEG-ZFBDT , " Due date 10
PON LIKE EKKO-EBELN , " PON 10
MAKTX LIKE MAKT-MAKTX, "Material text 40
MBLNR LIKE MSEG-MBLNR,
QTY(8) TYPE P DECIMALS 2 , "Qty 11
RATE(9) TYPE P DECIMALS 2 , "Rate 11
DISCOUNT(7) TYPE P DECIMALS 2, "DISCOUNT 11
PROD-AMT(9) TYPE P DECIMALS 2,
"AMOUNT 13
EXCISE(5) TYPE P DECIMALS 2 , "eXCISE TAX 11
SALES(5) TYPE P DECIMALS 2 , "SALES TAX 11
FREIGHT(5) TYPE P DECIMALS 2, "FREIGHT 11
OTHERS(9) TYPE P DECIMALS 2, " OTHERS 11
TOTAL(9) TYPE P DECIMALS 2, "TOTAL 17
END OF IT_FINAL_VN.
End of Insert by B.Elan on 23/12/2005
DATA: BEGIN OF ITAB_DISPLAY OCCURS 0,
BLART LIKE BKPF-BLART, " doctype
BELNR LIKE BSEG-BELNR, "sr - nO 10
XBLNR LIKE BKPF-XBLNR , " Bill-no 16
NAME1_VENDOR(25), "lfa1-name1, " Vendor Name 35
HKONT LIKE BSEG-HKONT , " Alloc-cd 10
MWSKZ LIKE EKPO-MWSKZ , " St-cd 2
BUDAT LIKE BKPF-BUDAT , " Bill-dt 10
DUE_DATE LIKE BSEG-ZFBDT , " Due date 10
PON LIKE EKKO-EBELN , " PON 10
MAKTX LIKE MAKT-MAKTX, "Material text 40
QTY(8) TYPE P DECIMALS 2 , "Qty 11
"qty 5
RATE(5) TYPE P DECIMALS 2 , "Rate 11
mod starts on 21/08 for inc size to 7
RATE(9) TYPE P DECIMALS 2 , "Rate 11
"Rate 7
mod ends - sanjay jajoo 21/08
DISCOUNT(7) TYPE P DECIMALS 2, "DISCOUNT 11
PROD-AMT(9) TYPE P DECIMALS 2, "AMOUNT 13
EXCISE(5) TYPE P DECIMALS 2 , "eXCISE TAX 11
SALES(5) TYPE P DECIMALS 2 , "SALES TAX 11
FREIGHT(5) TYPE P DECIMALS 2, "FREIGHT 11
OTHERS(9) TYPE P DECIMALS 2, " OTHERS 11 " added by vik on
*21.08.2008
TOTAL(9) TYPE P DECIMALS 2, "TOTAL 17
TOTAL1(9) TYPE P DECIMALS 2,
MATNR LIKE MARA-MATNR,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
END OF ITAB_DISPLAY.
DATA: BEGIN OF ITAB_TOTAL1 OCCURS 0,
HKONT LIKE BSEG-HKONT,
TOTAL TYPE P DECIMALS 2,
TXT50 LIKE SKAT-TXT50,
END OF ITAB_TOTAL1.
DATA: BEGIN OF ITAB_KONV OCCURS 0,
KNUMV LIKE KONV-KNUMV,
KPOSN LIKE KONV-KPOSN,
STUNR LIKE KONV-STUNR,
ZAEHK LIKE KONV-ZAEHK,
KSCHL LIKE KONV-KSCHL,
KWERT LIKE KONV-KWERT,
END OF ITAB_KONV.
DATA:BEGIN OF ITAB_RATE_MODVAT OCCURS 0,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MENGE LIKE EKPO-MENGE,
BRTWR LIKE EKPO-BRTWR,
KZWI5 LIKE EKPO-KZWI5,
KNUMV LIKE EKKO-KNUMV,
MATNR LIKE EKPO-MATNR,
TXZ01 LIKE EKPO-TXZ01,
END OF ITAB_RATE_MODVAT.
DATA: BEGIN OF ITAB_PO OCCURS 0,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
END OF ITAB_PO.
DATA: BEGIN OF ITAB_PO_ITEM OCCURS 0,
BELNR LIKE BSEG-BELNR,
EBELN LIKE BSEG-EBELN,
BUZID LIKE BSEG-BUZID,
XBLNR LIKE BKPF-XBLNR,
MATNR LIKE BSEG-MATNR,
EBELP LIKE BSEG-EBELP,
MENGE LIKE BSEG-MENGE,
WRBTR LIKE BSEG-WRBTR,
EXCISE LIKE BSEG-DMBTR, " ADDED ON 21/01/02 FOR 27500 EXCISE
SGTXT LIKE BSEG-SGTXT, " ADDED ON 24/01/02
FLAG,
END OF ITAB_PO_ITEM.
DATA:BEGIN OF I_LFA1 OCCURS 0,
LIFNR LIKE BSEG-LIFNR,
END OF I_LFA1.
DATA: BEGIN OF I_VENDOR OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF I_VENDOR.
DATA: BEGIN OF ITAB_PO_OTHERS OCCURS 0,
BELNR LIKE BSEG-BELNR,
MATNR LIKE BSEG-MATNR,
EBELN LIKE BSEG-EBELN,
EBELP LIKE BSEG-EBELP,
MENGE LIKE BSEG-MENGE,
WRBTR LIKE BSEG-WRBTR,
END OF ITAB_PO_OTHERS.
DATA: BEGIN OF ITAB_FINAL OCCURS 0,
BUKRS LIKE BSEG-BUKRS,
BELNR LIKE BSEG-BELNR,
GJAHR LIKE BSEG-GJAHR,
BUZEI LIKE BSEG-BUZEI,
BUZID LIKE BSEG-BUZID,
SHKZG LIKE BSEG-SHKZG,
EBELN LIKE BSEG-EBELN,
EBELP LIKE BSEG-EBELP,
MENGE LIKE BSEG-MENGE,
WRBTR LIKE BSEG-WRBTR,
MATNR LIKE BSEG-MATNR,
HKONT LIKE BSEG-HKONT, " ADDED ON 21/01/02 FOR 27500 EXCISE
SGTXT LIKE BSEG-SGTXT, " ADDED ON 24/01/02 FOR SALES TAX
END OF ITAB_FINAL.
DATA : BEGIN OF ITAB OCCURS 100 ,
MWSKZ LIKE EKPO-MWSKZ , " St-cd
HKONT LIKE BSEG-HKONT , " Alloc-cd
MBLNR LIKE MKPF-MBLNR , " Sr-No
LIFNR LIKE LFA1-LIFNR , " Supp-cd
XBLNR LIKE BKPF-XBLNR , " Bill-no
BUDAT LIKE BKPF-BUDAT , " Bill-dt
DUE_DATE LIKE BSEG-ZFBDT , " Due date
PON LIKE EKKO-EBELN , " PON
BELNR LIKE BKPF-BELNR , " CCI no
DMBTR LIKE BSEG-DMBTR , " Prod-amount
EXCISE LIKE BSEG-DMBTR , " Excise / ModVAT
ST_INV LIKE BSEG-DMBTR , " Sales Tax Loaded on Inv.
ST_SET LIKE BSEG-DMBTR , " Sales Tax setoff .
OCT_TOT LIKE BSEG-DMBTR , " A,A, (29/03/2000) Octroi chargs
PT_PABLE LIKE BSEG-DMBTR , " Purchase tax payable
ST_TOT LIKE BSEG-DMBTR , " Sales Tax total
OTHR_CHRG LIKE BSEG-DMBTR , " Other chagres
NEBTR LIKE BSEG-NEBTR, " Total-amount
NAME1_VENDOR LIKE LFA1-NAME1, " Vendor Name
END OF ITAB.
DATA: BEGIN OF ITAB_DOC OCCURS 0,
BELNR LIKE BKPF-BELNR,
BLART LIKE BKPF-BLART,
END OF ITAB_DOC.
DATA : BEGIN OF DOCTAB OCCURS 100 ,
MWSKZ LIKE BSEG-MWSKZ ,
HKONT LIKE BSEG-HKONT ,
BELNR LIKE BKPF-BELNR ,
Changed By Pankaj 19.03.99
Included field fiscal year
GJAHR LIKE BKPF-GJAHR ,
BUDAT LIKE BKPF-BUDAT ,
XBLNR LIKE BKPF-XBLNR ,
LIFNR LIKE LFA1-LIFNR ,
ZTERM LIKE BSEG-ZTERM ,
AMOUNT LIKE BSEG-DMBTR ,
DMBTR LIKE BSEG-DMBTR ,
OTHR_CHRG LIKE BSEG-DMBTR ,
MBLNR LIKE MKPF-MBLNR ,
MJAHR LIKE MSEG-MJAHR ,
DUE_DATE LIKE BSEG-ZFBDT ,
PON LIKE EKKO-EBELN ,
JMO1 LIKE BSEG-DMBTR ,
JMO2 LIKE BSEG-DMBTR ,
JIP1 LIKE BSEG-DMBTR ,
JIP2 LIKE BSEG-DMBTR ,
************CH-ID-ADI-START-28 / 09 / 1999
JIP4 LIKE BSEG-DMBTR ,
ZTUT LIKE BSEG-DMBTR ,
*****************ABEY
ZOCT LIKE BSEG-DMBTR ,
*****************END
************CH-ID-ADI-START-28 / 09 / 1999
ZSET LIKE BSEG-DMBTR ,
ZPTX LIKE BSEG-DMBTR ,
BLART LIKE BKPF-BLART ,
END OF DOCTAB .
Download for EDP "EDP
DATA : BEGIN OF DOWNLOAD OCCURS 100 ,
SIGN1(1) ,
TOT_VAL(11) TYPE N,
SIGN2(1) ,
TAXABLE(11) TYPE N ,
SIGN3(1) ,
TOT_TAX(11) TYPE N ,
SIGN4(1) ,
SURCHARG(9) TYPE N ,
SIGN5(1) ,
ST_AMT(9) TYPE N ,
SIGN6(1) ,
OTH_CHRG(9) TYPE N ,
******************************ch-adi-start-28 / 09 / 1999
SIGN7(1),
TOT(9) TYPE N,
******************************ch-adi-end-28 / 09 / 1999
TYPE(1) TYPE N ,
STKY1(1) TYPE N ,
STBR(2) ,
STDV(2) ,
STCC(1) ,
STKY(1) ,
STDC(2) TYPE N ,
STTYP(1) ,
STCODE(2) ,
STRATE(2) TYPE N ,
STRTT(2) TYPE N ,
SERIAL_NO(6) TYPE N ,
STACP(9) ,
BLANK1(3) ,
STYRMN(6) ,
BLANK2(7) TYPE C .
DATA : END OF DOWNLOAD .
DATA : BEGIN OF GLTAB OCCURS 5 ,
MWSKZ LIKE BSEG-MWSKZ, " << ADD A.A. (01.02.2000)
HKONT LIKE BSEG-HKONT ,
DMBTR LIKE BSEG-DMBTR , " Prod-amount
EXCISE LIKE BSEG-DMBTR , " Excise / ModVAT
ST_INV LIKE BSEG-DMBTR , " Sales Tax Loaded on Inv.
ST_SET LIKE BSEG-DMBTR , " Sales Tax setoff .
PT_PABLE LIKE BSEG-DMBTR , " Purchase tax payable
ST_TOT LIKE BSEG-DMBTR , " Sales Tax total
OTHR_CHRG LIKE BSEG-DMBTR , " Other Charges
NEBTR LIKE BSEG-NEBTR. " Total-amount
DATA : END OF GLTAB .
DATA : BEGIN OF ERRORTAB OCCURS 5 .
INCLUDE STRUCTURE ITAB .
DATA : END OF ERRORTAB .
*- Start of change by Raj on 3-Spet-05
DATA : V_TMPVAL TYPE P DECIMALS 2.
*- End of change by Raj on 3-Spet-05
DATA : STRING LIKE BKPF-AWKEY ,
V_NO TYPE I,
V_EBELN LIKE BSEG-EBELN,
V_MATNR LIKE BSEG-MATNR. " ADDED ON 21/01/02 FOR BUZID = 'S'
Start of Insert by B.Elan on 23/12/2005
WORK AREA
DATA : WA_DISPLAY LIKE ITAB_DISPLAY.
DATA : V_UCOMM TYPE SY-UCOMM.
CONSTANTS : C_X TYPE C VALUE 'X'.
End of Insert by B.Elan on 23/12/2005
AT SELECTION-SCREEN ON T_BUKRS.
SELECT SINGLE * FROM T001 WHERE BUKRS = T_BUKRS .
IF SY-SUBRC NE 0 .
MESSAGE E368 WITH T_BUKRS TEXT-M01 .
ENDIF .
AT SELECTION-SCREEN ON T_MONAT.
PERFORM check_period_year USING 'X'. " COMMENTED
AT SELECTION-SCREEN ON T_GJAHR.
PERFORM check_period_year USING ' '. "COMMENTED
Start of Delete by B.Elan on 23/12/2005
*AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1 .
CLEAR fname .
DATA : BEGIN OF xt247 OCCURS 12 .
INCLUDE STRUCTURE t247 .
DATA : END OF xt247 .
CHECK dload EQ 'X' .
REFRESH xt247 .
IF poper EQ 'X' .
MESSAGE e368 WITH text-m05 .
ENDIF .
CALL FUNCTION 'MONTH_NAMES_GET'
TABLES
month_names = xt247
EXCEPTIONS
month_names_not_found = 1
OTHERS = 2.
READ TABLE xt247 WITH KEY mnr = t_monat .
CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
CONCATENATE '
DOWNLOAD\' fname INTO fname1.
CONCATENATE zfile1 fname INTO zfile2.
CONDENSE fname1 NO-GAPS.
CONDENSE zfile2 NO-GAPS.
CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
End of Delete by B.Elan on 23/12/2005
AT SELECTION-SCREEN OUTPUT .
LOOP AT SCREEN .
IF SCREEN-NAME EQ 'FNAME' .
SCREEN-INPUT = 0.
MODIFY SCREEN .
ENDIF .
IF SCREEN-GROUP2 EQ 'DBS' .
SCREEN-ACTIVE = 0 .
MODIFY SCREEN .
IF SCREEN-NAME EQ 'BR_BLART-LOW' .
Form the select option for the LDB .
CLEAR BR_BLART . REFRESH BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'RE' .
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'SR' .
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'SP' .
APPEND BR_BLART . " ADD ON 11122003 JAJ
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
br_blart-low = 'VI' .
BR_BLART-LOW = 'ST'.
APPEND BR_BLART .
BR_BLART-LOW = 'S1'.
APPEND BR_BLART .
BR_BLART-LOW = 'P1'.
APPEND BR_BLART .
BR_BLART-LOW = 'PM'.
APPEND BR_BLART .
BR_BLART-LOW = 'R1'.
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'KR' .
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
*************CH-ID-ADI---30 / 09 / 1999.
BR_BLART-LOW = 'RA'.
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'EM'.
APPEND BR_BLART .
BR_BLART-SIGN = 'I' .
BR_BLART-OPTION = 'EQ' .
BR_BLART-LOW = 'EI' .
APPEND BR_BLART .
ENDIF .
ENDIF .
CHECK SCREEN-GROUP1 EQ 'DAT' .
SCREEN-INPUT = 0.
MODIFY SCREEN .
ENDLOOP .
START-OF-SELECTION .
Block 1 - Selection of accounting documents in the posting period
is done through the LDB
GET BKPF .
commented on 22/08
CHECK BKPF-MONAT = T_MONAT.
CHECK BKPF-MONAT IN T_MONAT.
CHECK BKPF-GJAHR = T_GJAHR.
CHECK BKPF-STBLG IS INITIAL . "<<<< Reversed
*CHECK bkpf-budat IN t_budat .
CHECK BKPF-BUKRS EQ T_BUKRS .
CHECK BKPF-BUKRS EQ T_BUKRS .
CHECK BKPF-BSTAT EQ SPACE . "<<< Sample docs
CHECK BKPF-BLART EQ 'RE' "MM-IV
OR BKPF-BLART EQ 'KR' "FI-IV
OR bkpf-blart EQ 'VI' "FI-IV Direct
*************CH-ID-ADI-30 / 09 / 1999
OR bkpf-blart EQ 'RA' "CASH CCI
OR bkpf-blart EQ 'EM' "MAINTAINANCE
OR bkpf-blart EQ 'EI' . "IDT
OR BKPF-BLART EQ 'P1'
OR BKPF-BLART EQ 'PM'
OR BKPF-BLART EQ 'R1'
OR BKPF-BLART EQ 'S1'
OR BKPF-BLART EQ 'ST'
OR BKPF-BLART EQ 'SR' " ADD ON 101203 JAJ
OR BKPF-BLART EQ 'SP'.
*************CH-ID-ADI-30 / 09 / 1999
CLEAR DOCTAB .
DOCTAB-BLART = BKPF-BLART .
DOCTAB-BELNR = BKPF-BELNR .
DOCTAB-BUDAT = BKPF-BUDAT .
DOCTAB-XBLNR = BKPF-XBLNR .
Added By Pankaj 19.03.99
Initializing fiscal year for document table
DOCTAB-GJAHR = BKPF-GJAHR .
APPEND DOCTAB.
Tax details
GET BSET . " Commented because LDB gives wrong BSET entries
" for some documents
CASE BSET-KSCHL .
WHEN 'JMO1' .
DOCTAB-JMO1 = DOCTAB-JMO1 + BSET-HWSTE .
WHEN 'JMO2' .
DOCTAB-JMO2 = DOCTAB-JMO2 + BSET-HWSTE .
WHEN 'JIP1' .
DOCTAB-JIP1 = DOCTAB-JIP1 + BSET-HWSTE .
WHEN 'JIP2' .
DOCTAB-JIP2 = DOCTAB-JIP2 + BSET-HWSTE .
WHEN 'ZSET' .
break deven .
DOCTAB-ZSET = DOCTAB-ZSET + BSET-HWSTE .
WHEN 'ZPTX' .
DOCTAB-ZPTX = DOCTAB-ZPTX + BSET-HWSTE .
ENDCASE .
DOCTAB-MWSKZ = BSET-MWSKZ.
MODIFY DOCTAB INDEX SY-TABIX.
Item details
*changed by srinivas yerra.
GET BSEG .
IF BSEG-KOART = 'K' . "<<< Vendor Line
IF BSEG-KOART = 'K' .
*end of chnages by srinivas yerra.
DOCTAB-LIFNR = BSEG-LIFNR .
IF NOT BSEG-ZTERM IS INITIAL .
DOCTAB-ZTERM = BSEG-ZTERM .
DOCTAB-DUE_DATE = BSEG-ZFBDT + BSEG-ZBD1T .
ENDIF .
IF BSEG-SHKZG EQ 'H' . "<< Add credits
DOCTAB-AMOUNT = DOCTAB-AMOUNT + BSEG-DMBTR .
ELSE . "<< Subtr debits
DOCTAB-AMOUNT = DOCTAB-AMOUNT - BSEG-DMBTR .
ENDIF .
ENDIF .
CASE BSEG-KTOSL .
WHEN 'WRX' .
DOCTAB-PON = BSEG-EBELN .
IF DOCTAB-MWSKZ IS INITIAL .
DOCTAB-MWSKZ = BSEG-MWSKZ .
ENDIF .
WHEN 'BSX' .
***********ABEY
IF NEXT = BSEG-BUZEI
AND
DOC = BSEG-BELNR
AND
( BSEG-BUZID = 'M'
OR
BSEG-HKONT = 50765 ).
DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
IF BSEG-SHKZG EQ 'H' . "<< Subtr credits
DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
ELSE . "<< Add debits
DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
ENDIF .
ENDIF .
************END
IF BSEG-SHKZG EQ 'S' .
DOCTAB-DMBTR = DOCTAB-DMBTR + BSEG-DMBTR .
ELSE .
DOCTAB-DMBTR = DOCTAB-DMBTR - BSEG-DMBTR .
ENDIF .
WHEN 'OCT' OR 'FRE' OR 'FR1' OR SPACE .
*****CH-ID-ADI-30 / 09 /1999.
IF ( ( BKPF-BLART = 'EM' OR BKPF-BLART = 'RA' OR BKPF-BLART =
'EI')
AND BSEG-KTOSL = SPACE ) OR BSEG-MWSKZ = '9W' OR BSEG-MWSKZ =
'K9' OR
BSEG-MWSKZ =
'X9'.
DOCTAB-OTHR_CHRG = 0.
ELSE.
*********CH-ID-ADI--01 / 10 / 1999
Other Charges only for accounts other than vendor acc.
CHECK BSEG-BUZID NE 'T' .
CHECK BSEG-BUZID NE 'P' .
IF BSEG-KOART NE 'K' .
*********ABEY (25/02/2000), (21/02/2000)
IF BSEG-BUZID = 'F'
OR BSEG-HKONT = 75461.
NEXT = BSEG-BUZEI + 1.
DOC = BSEG-BELNR.
DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
ENDIF.
IF BSEG-BUZEI = NEXT
AND
( BSEG-BUZID = 'M'
OR
BSEG-HKONT = 50765 ).
DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
ENDIF.
*********END
IF BSEG-SHKZG EQ 'H' . "<< Subtr credits
DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
ELSE . "<< Add debits
DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
ENDIF .
ENDIF .
*****NEXT-LINE ADDED BY ADI
ENDIF .
*************END.
ENDCASE .
*CHANGED BY SRINIVAS YERRA
*MODIFY DOCTAB INDEX SY-TABIX.
APPEND DOCTAB.
*END OF CHANGES.
PO History
GET EKBE .
CHECK DOCTAB-BELNR EQ EKBE-BELNR .
DOCTAB-MBLNR = EKBE-LFBNR .
DOCTAB-MJAHR = EKBE-LFGJA .
MODIFY DOCTAB INDEX SY-TABIX .
PERFORM show_indicator USING text-m02 .
*PERFORM convert_data.
END-OF-SELECTION .
Data read from LDB is converted into printable format.
PERFORM SHOW_INDICATOR USING TEXT-M04 .
PERFORM CONVERT_DATA .
Start of Delete by B.Elan on 23/12/2005
IF stax_reg EQ 'X' . "<<< Add
SORT itab BY mwskz hkont belnr .
ELSE . "<<< Add
SORT itab BY belnr . "<<< Add
SORT itab BY pon.
ENDIF . "<<< Add
Perform further operation based on user input
IF display EQ 'X' .
PERFORM write_itab.
PERFORM write_data .
ELSE .
PERFORM download_data .
ENDIF .
End of Delete by B.Elan on 23/12/2005
Start of Insert by B.Elan on 23/12/2005
SORT ITAB BY BELNR.
PERFORM WRITE_DATA.
IF MAT_SM = C_X.
PERFORM WRITE_MATERIAL_SUMMARY.
ELSEIF MAT_DT = C_X.
PERFORM WRITE_MATERIAL_DETAILS.
ELSEIF VEN_SM = C_X.
PERFORM WRITE_VENDOR_SUMMARY.
ELSEIF VEN_DT = C_X.
PERFORM WRITE_VENDOR_DETAILS.
ENDIF.
End of Insert by B.Elan on 23/12/2005
Start of Insert by B.Elan on 23/12/2005
AT USER-COMMAND.
V_UCOMM = SY-UCOMM.
CASE V_UCOMM.
WHEN 'DETLS'.
NEW-PAGE.
PUR_DB = C_X.
PERFORM CLEAR_DETAILS.
PERFORM WRITE_DATA.
WHEN 'MSUMRY'.
PERFORM WRITE_MATERIAL_SUMMARY.
WHEN 'MDETL'.
PERFORM WRITE_MATERIAL_DETAILS.
WHEN 'VSUMRY'.
PERFORM WRITE_VENDOR_SUMMARY.
WHEN 'VDETL'.
PERFORM WRITE_VENDOR_DETAILS.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
End of Insert by B.Elan on 23/12/2005
*- - - - - - - - - End Of Execution .- - - - - - - - - - - - - - - - - -
TOP-OF-PAGE .
IF PUR_DB = C_X.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_PUR_DB.
ELSEIF MAT_SM = C_X.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_MAT_SM.
ELSEIF MAT_DT = C_X.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_MAT_DT.
ELSEIF VEN_SM = C_X.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_VEN_SM.
ELSEIF VEN_DT = C_X.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_VEN_DT.
ENDIF.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE V_UCOMM.
WHEN 'DETLS'.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_PUR_DB.
WHEN 'MSUMRY'.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_MAT_SM.
WHEN 'MDETL'.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_MAT_DT.
WHEN 'VSUMRY'.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_VEN_SM.
WHEN 'VDETL'.
PERFORM TOP_OF_PAGE.
PERFORM TOP_OF_PAGE_VEN_DT.
ENDCASE.
*& Form WRITE_DATA
text *
FORM WRITE_DATA.
DATA: V_SALES LIKE ITAB_DISPLAY-SALES,
V_RATE LIKE ITAB_DISPLAY-RATE,
V_DISCOUNT LIKE ITAB_DISPLAY-DISCOUNT,
V_PROD-AMT LIKE ITAB_DISPLAY-PROD-AMT,
V_EXCISE1 LIKE ITAB_DISPLAY-EXCISE,
V_EXCISE LIKE ITAB_DISPLAY-EXCISE,
V_PON LIKE ITAB_DISPLAY-PON,
V_OTHERS LIKE ITAB_DISPLAY-OTHERS,
V_FREIGHT LIKE ITAB_DISPLAY-FREIGHT.
CLEAR ITAB .
Write the correct data i.e. tax code and G/L code both available .
LOOP AT ITAB .
*************CH-ID-ADI-30 / 09 / 1999
IF ( ITAB-MWSKZ = '9W' OR ITAB-MWSKZ = 'K9' OR ITAB-MWSKZ = 'X9' )
AND ITAB-OTHR_CHRG NE 0 .
ITAB-DMBTR = ITAB-OTHR_CHRG.
ITAB-OTHR_CHRG = 0.
MODIFY ITAB.
ENDIF.
ENDLOOP.
LOOP AT ITAB.
I_LFA1-LIFNR = ITAB-LIFNR.
APPEND I_LFA1.
CLEAR I_LFA1.
ENDLOOP.
SORT I_LFA1.
DELETE ADJACENT DUPLICATES FROM I_LFA1 COMPARING ALL FIELDS.
SELECT LIFNR
NAME1
FROM LFA1 INTO TABLE I_VENDOR
FOR ALL ENTRIES IN I_LFA1 WHERE
LIFNR = I_LFA1-LIFNR.
FREE I_LFA1.
LOOP AT ITAB.
READ TABLE I_VENDOR WITH KEY LIFNR = ITAB-LIFNR .
IF SY-SUBRC EQ 0.
ITAB-NAME1_VENDOR = I_VENDOR-NAME1.
MODIFY ITAB TRANSPORTING NAME1_VENDOR.
ENDIF.
ENDLOOP.
LOOP AT ITAB.
IF NOT ITAB-LIFNR IN S_VENDOR.
DELETE ITAB.
ENDIF.
ENDLOOP.
SELECT BUKRS BELNR GJAHR BUZEI BUZID SHKZG EBELN EBELP ERFMG WRBTR
MATNR HKONT SGTXT " ERFMG for MENGE,HKONT,SGTXT Added by KrishnaMohan
INTO TABLE ITAB_FINAL
FROM BSEG FOR ALL ENTRIES IN ITAB
WHERE BUKRS = T_BUKRS AND "'1000' AND
BELNR = ITAB-BELNR AND
*added by srinivas
hkont in zgl and
*end
GJAHR = T_GJAHR AND
*- Start of change by Raj on 030905
buzid IN ('W', 'M', 'K', 'S', 'F' , 'P' ) AND
BUZID IN ('W', 'M', 'K', 'S', 'F' , 'P' , 'T', ' ') AND
" ADD T 090206 JAJ
KOART <> 'K' AND " mod by vik on 21.08.2008" sjaj si
*- End of change by Raj on 030905
BUZID = P Added on 21/01/02 by Krishna Mohan
GSBER IN P_GSBER AND
gsber IN p_gsber OR gsber = ' ' AND
MATNR IN S_MATNR.
SELECT BELNR BLART INTO TABLE ITAB_DOC FROM BKPF
FOR ALL ENTRIES IN ITAB_FINAL WHERE
BUKRS = T_BUKRS AND "'1000' AND
BELNR = ITAB_FINAL-BELNR AND
GJAHR = T_GJAHR AND
BLART NOT IN ('WA' , 'WE').
SORT ITAB_DOC BY BELNR BLART.
LOOP AT ITAB_DOC.
IF NOT ITAB_DOC-BLART IN S_DOCTYP .
DELETE ITAB_DOC.
ENDIF.
ENDLOOP.
LOOP AT ITAB_FINAL.
READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_FINAL-BELNR BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE ITAB_FINAL.
ENDIF.
ENDLOOP.
DELETE ITAB_FINAL WHERE BUZID = 'K' AND BUZEI = '1'.
LOOP AT ITAB_FINAL WHERE SHKZG = 'H'.
ITAB_FINAL-WRBTR = ITAB_FINAL-WRBTR * ( -1 ).
MODIFY ITAB_FINAL TRANSPORTING WRBTR.
ENDLOOP.
LOOP AT ITAB_FINAL WHERE BUZID = 'M'.
IF ITAB_FINAL-SGTXT NE ' '.
TRANSLATE ITAB_FINAL-SGTXT TO UPPER CASE.
MODIFY ITAB_FINAL.
ENDIF.
ENDLOOP.
LOOP AT ITAB_FINAL .
IF ITAB_FINAL-BUZID = 'W'.
CLEAR V_MATNR.
V_EBELN = ITAB_FINAL-EBELN.
V_MATNR = ITAB_FINAL-MATNR.
ITAB_PO_ITEM-BELNR = ITAB_FINAL-BELNR.
ITAB_PO_ITEM-BUZID = ITAB_FINAL-BUZID.
ITAB_PO_ITEM-MATNR = ITAB_FINAL-MATNR.
ITAB_PO_ITEM-EBELN = ITAB_FINAL-EBELN.
ITAB_PO_ITEM-EBELP = ITAB_FINAL-EBELP.
ITAB_PO_ITEM-MENGE = ITAB_FINAL-MENGE.
ITAB_PO_ITEM-WRBTR = ITAB_FINAL-WRBTR.
COLLECT ITAB_PO_ITEM.
CLEAR ITAB_PO_ITEM.
ELSEIF ITAB_FINAL-BUZID = 'M' OR ITAB_FINAL-BUZID = 'K' OR
ITAB_FINAL-BUZID = 'S' OR
ITAB_FINAL-BUZID = 'P' OR " ADDED ON 21/01/02
*- Start of change by Raj on 030905
ITAB_FINAL-BUZID = ' ' OR
ITAB_FINAL-BUZID = 'T' OR " ADD BY JAJ ON 090206
*- End of change by Raj on 030905
ITAB_FINAL-BUZID = 'F'.
IF ITAB_FINAL-MATNR IS INITIAL.
ITAB_FINAL-MATNR = V_MATNR.
ENDIF.
CLEAR V_MATNR.
ITAB_PO_OTHERS-BELNR = ITAB_FINAL-BELNR.
ITAB_PO_OTHERS-MATNR = ITAB_FINAL-MATNR.
ITAB_PO_OTHERS-EBELN = ITAB_FINAL-EBELN.
ITAB_PO_OTHERS-EBELP = ITAB_FINAL-EBELP.
ITAB_PO_OTHERS-MENGE = ITAB_FINAL-MENGE.
ITAB_PO_OTHERS-WRBTR = ITAB_FINAL-WRBTR.
IF CONDITION,ADDED ON 21/01/02 FOR GETTING EXCISE WHEN CONDITION MEETS
ie TOTAL AMOUNT = EXCISE WHEN BUZID = S AND HKONT = 27500
*IF itab_final-buzid = 'S' AND ( itab_final-hkont = '0000027500' OR "
*COMM BY JAJ ON 090206
IF ITAB_FINAL-BUZID = 'S' OR ITAB_FINAL-BUZID = 'T' AND (
ITAB_FINAL-HKONT = '0000027500' OR
ITAB_FINAL-HKONT = '0000027515'
OR ITAB_FINAL-HKONT = '0000027550' " jaj on 090206
OR ITAB_FINAL-HKONT = '0000027507' OR
ITAB_FINAL-HKONT = '0000027508'). "Added on 050905 - Raj
ITAB_FINAL-EBELN = V_EBELN.
to get ebeln value into header so that when there are 2 po's
and 2 W's excise can go into only one po which is v_ebeln
Start of insert by B.Elan on 10/02/2006
READ TABLE ITAB_PO_ITEM WITH KEY BELNR = ITAB_FINAL-BELNR
EBELN = ITAB_FINAL-EBELN
MATNR = ITAB_FINAL-MATNR.
ITAB_PO_ITEM-EXCISE = ITAB_PO_ITEM-EXCISE + ITAB_FINAL-WRBTR.
End of insert by B.Elan on 10/02/2006
Start of delete by B.Elan on 10/02/2006
itab_po_item-excise = itab_final-wrbtr.
End of delete by B.Elan on 10/02/2006
MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
WHERE BELNR EQ ITAB_FINAL-BELNR AND
EBELN EQ ITAB_FINAL-EBELN.
CLEAR ITAB_PO_ITEM.
ELSE.
COLLECT ITAB_PO_OTHERS.
ENDIF.
CLEAR ITAB_PO_OTHERS.
ENDIF.
ENDLOOP.
sateesh
SORT ITAB_PO_ITEM BY BELNR EBELN.
LOOP AT ITAB_PO_ITEM.
AT NEW BELNR.
AT NEW EBELN.
READ TABLE ITAB_PO_ITEM INDEX SY-TABIX.
ITAB_PO_ITEM-FLAG = 'X'.
MODIFY ITAB_PO_ITEM INDEX SY-TABIX.
ENDAT.
ENDAT.
ENDLOOP.
LOOP AT ITAB_PO_ITEM.
ITAB_PO_ITEM-EXCISE = 0.
MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
WHERE EXCISE > 0
AND FLAG = SPACE.
ENDLOOP.
end
LOOP AT ITAB_PO_ITEM.
ITAB_PO-EBELN = ITAB_PO_ITEM-EBELN.
ITAB_PO-EBELP = ITAB_PO_ITEM-EBELP.
APPEND ITAB_PO.
CLEAR ITAB_PO.
ENDLOOP.
LOOP AT ITAB_PO_OTHERS.
ITAB_PO-EBELN = ITAB_PO_OTHERS-EBELN.
ITAB_PO-EBELP = ITAB_PO_OTHERS-EBELP.
APPEND ITAB_PO.
CLEAR ITAB_PO.
ENDLOOP.
SORT ITAB_PO.
DELETE ADJACENT DUPLICATES FROM ITAB_PO COMPARING ALL FIELDS.
SELECT EKPO~EBELN
EBELP
MENGE
BRTWR
KZWI5
EKKO~KNUMV
EKPO~MATNR
EKPO~TXZ01
INTO TABLE ITAB_RATE_MODVAT
FROM EKPO INNER JOIN EKKO
ON EKPO~EBELN = EKKO~EBELN
FOR ALL ENTRIES IN ITAB_PO WHERE
EKPO~EBELN = ITAB_PO-EBELN AND
EBELP = ITAB_PO-EBELP.
SELECT KNUMV KPOSN STUNR ZAEHK KSCHL KWERT
INTO TABLE ITAB_KONV
FROM KONV
FOR ALL ENTRIES IN ITAB_RATE_MODVAT
WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND
KSCHL IN ('YT02', 'YF07', 'YOTH', 'YPF1', 'YD01', 'YD02', 'YD03' ) .
SORT ITAB_KONV BY KNUMV KSCHL.
SORT ITAB BY BELNR.
SORT ITAB_RATE_MODVAT BY EBELN EBELP.
SORT ITAB_PO_OTHERS BY BELNR MATNR.
LOOP AT ITAB_PO_ITEM.
ITAB_DISPLAY-BELNR = ITAB_PO_ITEM-BELNR.
READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY
SEARCH.
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-BLART = ITAB_DOC-BLART.
ENDIF.
READ TABLE ITAB WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY SEARCH.
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-XBLNR = ITAB-XBLNR.
ITAB_PO_ITEM-XBLNR = ITAB-XBLNR.
ITAB_DISPLAY-NAME1_VENDOR = ITAB-NAME1_VENDOR.
ITAB_DISPLAY-HKONT = ITAB-HKONT.
ITAB_DISPLAY-MWSKZ = ITAB-MWSKZ.
ITAB_DISPLAY-BUDAT = ITAB-BUDAT.
ITAB_DISPLAY-DUE_DATE = ITAB-DUE_DATE.
ITAB_DISPLAY-PON = ITAB_PO_ITEM-EBELN.
ENDIF.
ITAB_DISPLAY-QTY = ITAB_PO_ITEM-MENGE.
READ TABLE ITAB_RATE_MODVAT WITH KEY EBELN = ITAB_PO_ITEM-EBELN
EBELP = ITAB_PO_ITEM-EBELP
BINARY SEARCH.
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-PON = ITAB_PO_ITEM-EBELN.
ITAB_DISPLAY-MATNR = ITAB_RATE_MODVAT-MATNR.
ITAB_DISPLAY-MAKTX = ITAB_RATE_MODVAT-TXZ01.
ITAB_DISPLAY-RATE = ITAB_RATE_MODVAT-BRTWR /
ITAB_RATE_MODVAT-MENGE.
ITAB_DISPLAY-PROD-AMT = ITAB_DISPLAY-RATE * ITAB_PO_ITEM-MENGE.
IF ITAB_PO_ITEM-EXCISE NE 0.
ITAB_DISPLAY-EXCISE = ITAB_PO_ITEM-EXCISE.
ELSE.
*ITAB_DISPLAY-EXCISE = ( ITAB_PO_ITEM-MENGE * ITAB_RATE_MODVAT-KZWI5 ) /
ITAB_RATE_MODVAT-MENGE.
*commentedon 210102 to get excise directly from BSEG - IV
ENDIF.
ENDIF.
READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
KPOSN = ITAB_RATE_MODVAT-EBELP
KSCHL = 'YT02' .
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-SALES = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
ITAB_RATE_MODVAT-MENGE.
READ TABLE ITAB_FINAL WITH KEY BELNR = ITAB_PO_ITEM-BELNR
BUZID = 'M'
SGTXT(9) = 'SALES TAX'.
IF SY-SUBRC EQ 0.
IF ITAB_FINAL-SGTXT(9) EQ 'SALES TAX'
OR ITAB_FINAL-SGTXT(9) EQ 'sales tax'.
ITAB_DISPLAY-SALES = ITAB_DISPLAY-SALES + ITAB_FINAL-WRBTR.
ENDIF.
ENDIF.
ENDIF.
READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
KPOSN = ITAB_RATE_MODVAT-EBELP
KSCHL = 'YF07'.
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-FREIGHT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
ITAB_RATE_MODVAT-MENGE.
ENDIF.
READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
KPOSN = ITAB_RATE_MODVAT-EBELP
KSCHL = 'YD01' .
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
ITAB_RATE_MODVAT-MENGE.
ELSE.
READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
KPOSN = ITAB_RATE_MODVAT-EBELP
KSCHL = 'YD02' .
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT )
ITAB_RATE_MODVAT-MENGE.
ELSE.
READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
KPOSN = ITAB_RATE_MODVAT-EBELP
KSCHL = 'YD03' .
IF SY-SUBRC EQ 0.
ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT
ITAB_RATE_MODVAT-MENGE.
ENDIF.
ENDIF.
ENDIF.
LOOP AT ITAB_KONV WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND KPOSN =
ITAB_RATE_MODVAT-EBELP AND
( KSCHL = 'YPF1' OR KSCHL = 'YOTH' ) .
ITAB_KONV-KWERT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
ITAB_RATE_MODVAT-MENGE.
ITAB_DISPLAY-OTHERS = ITAB_DISPLAY-OTHERS + ITAB_KONV-KWERT.
ENDLOOP.
READ TABLE ITAB_PO_OTHERS WITH KEY BELNR = ITAB_PO_ITEM-BELNR.
EBELN = ITAB_PO_ITEM-EBELN.
BINARY SEARCH.
sateesh as on 10092003
IF SY-SUBRC NE 0. CLEAR ITAB_PO_OTHERS. ENDIF.
end
IF NOT ITAB_PO_OTHERS-EBELN IS INITIAL.
READ TABLE ITAB_PO_OTHERS WITH KEY EBELN = ITAB_PO_ITEM-EBELN
EB
Maybe you are looking for
-
Report output format run in background
Hi All, when I am running any report containing large volume of data in background,report output is coming only of 10 pages by default.Even when exporting to desktop,data of only 10 pages are being exported.While my data is of around 1000 pages.Every
-
Error in Query (Pls help)
Hi friends, When i executed one of the queries, i get this error: Abort System error in program <b>CL_RSDM_READ_MASTER_DATA and form_sidval_direct</b> Diagnosis This internal error is a targeted termination since the program has an incorrect status.
-
Cant update in ipod touch why???
why i cant update all of my application in my ipod touch? when i go to updates tab theres a massage saying that there is no internet connection same in featured tab, but when i go to top 25 tab there is a connection why??plss help
-
BT Infinity Hub v4 - range extender issues BT 500 ...
I was pleased with Infinity, but v4 wireless range seemed worse than v3 - so I decided to install some range extenders to get the system working in my office at the top of the house - I bought a BT Extender 500 Kit. When first installed it worked re
-
My phone number in Phone->My Number can't be edit after I change my sim card?