Field name
Hi,
Can anyone tell the field name for vendor code and inwhich table it is present?
Regards,
Hema
LFA1-LIFNR Account Number of Vendor or Creditor
Hope this is your requirement.
Regards,
Pavan
Similar Messages
-
What are the field names for below mentioned
Hello Friends
What are the fields names for below tables
in EKKO
Purchase Document Date
Net Value of the purchase document.
In EKPO
Item Description
From which place We bought it. (It means in Sales Items there we can know from which plant we sold the goods, like in EKPO, there is any field like this)
Please let we are defining the report to find out the stock availability for perticular storage location using select Options plant, company code, material no.
How many tables involve her to build this report. and also field names, they come under which table.
Please send me this information ASAP. PLz Plz Plz..........
Regards
PraveenYou can check the fields of these tables via SE11
Purchase Document Date - EKKO-BEDAT
Item Description - EKPO-TXZ01
Net price per item - EKPO-NETPR.
Regards,
Rich Heilman -
Capture field name in table control on double click
Hi,
How can I capture the field name of internal table passed to table control on double click?
I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
Thanks in advance.
Regards
Ramesh.Got it.
We can capture it by using the statement GET CURSOR only.
GET CURSOR field <field xx> .
Here the <field xx> is the field name where we have said double click. -
Field names Missing in the (Excel) Mail attachment
Hi ,
I am trying to send my ALV Grid Output as Excel Email attachment using the below code
The problem is that the field names are missing in the receivers Mail.
i.e
*Name* *Emp Code* * Branch* "this is missing
abc 123 ukp
I searched many threads but unable to find the solution for this.
Kindly suggest me regarding this issue.
loop at p_eadd.
if p_eadd-low <> space.
clear reclist.
reclist-rec_type = 'U'. "Internet-adress
reclist-receiver = p_eadd-low.
reclist-express = 'X'.
append reclist.
endif.
endloop.
* endif.
* Send the document
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_type = 'RAW'
document_data = doc_chng
* PUT_IN_OUTBOX = 'X'
tables
object_content = objcont
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
ld_aplstat = '4'.
case sy-subrc.
when 0.
loop at reclist.
if reclist-receiver = space.
name = reclist-rec_id.
else.
name = reclist-receiver.
endif.
if reclist-retrn_code = 0.
write: / name, ': succesfully sent'.
else.
write: / name, ': error occured'.
endif.
endloop.
ld_aplstat = '0'.
when 1.
write: / 'Too many receivers specified !'.
when 2.
write: / 'No receiver got the document !'.
when 4.
write: / 'Missing send authority !'.
when others.
write: / 'Unexpected error occured !'.
endcase.
*.Tell workflow to go on
clear ls_scma_event.
ls_scma_event-wf_event = cs_wf_events-finished.
ls_scma_event-wf_witem = wf_witem.
ls_scma_event-wf_okey = wf_okey.
call function 'KPEP_MONI_CLOSE_RECORD'
exporting
ls_key = gs_key
ls_scma_event = ls_scma_event
changing
ld_aplstat = ld_aplstat
exceptions
no_id_given = 1
others = 2.
call function 'SAP_CONVERT_TO_XLS_FORMAT'
exporting
i_field_seperator = ' '
i_line_header = 'X'
i_filename = p_file
* I_APPL_KEEP = ' '
tables
i_tab_sap_data = it_final
* CHANGING
* I_TAB_CONVERTED_DATA =
exceptions
conversion_failed = 1
* OTHERS = 2
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Thanks in Advance,
Mr. BenHi Ben,
Follow the code below....
Your internal table it_final will have the attachment data. After you got the attachment data do the following
gc_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
lt_attachment TYPE TABLE OF solisti1 ,
gt_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0 WITH HEADER LINE,
CLEAR:gs_attach. <this will have your attachment, declare a structure which contains fields of your excel sheet>
<before this you have to copy all the fields from your final internal table which should be attached to email to gs_attach>
For attaching field names
CONCATENATE gc_ret gs_attach INTO gs_attach.
gs_attach = gs_attach+1.
APPEND gs_attach TO gt_attach.
CLEAR:lt_attachment.
lt_attachment[] = gt_attach[].
SORT lt_attachment .
DELETE ADJACENT DUPLICATES FROM lt_attachment COMPARING ALL FIELDS.
CLEAR gs_attach.
CONCATENATE <field names >
INTO gs_attach SEPARATED BY gc_tab.
INSERT gs_attach INTO lt_attachment INDEX 1.
<field addition ends>
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_type = 'RAW'
document_data = doc_chng
PUT_IN_OUTBOX = 'X'
tables
object_content = objcont
receivers = reclist
contents_bin = lt_attachment
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards,
Aravind. -
Unable to get Field Names from Archived File
Hi All,
We have a ECC 6 Ehp4 system. When i retrieve Idocs archived using SARA, the data only contains application data. There is no field names available - eg: posting date, tax code etc. Please find below the background on this issue.
I configured archiving of process idocs (status 52,12,03) from EDIDC tables. I set up the settings for Archive Object IDOC and archived the data for 15 days.
Both archiving and deletion of data from the table was successful.
I tried reading the Idoc data from Archive File using the Information System option -> Info structure (available as default for Idoc).
But the data retrieved only shows the Application data for all the segments of the IDoc. The fields for the segments like Tax Code, Posting Date etc are not available in the data. Functional teams will not be able to make sense with just the application data.
Am I missing some setting? Is there any way to retrieve the related field values also ?
Please help.
Thanks and Regards,
RaghavanHi All,
There is tcode WE10. You could choose if the data source is archive and also the archive session. You will get the list of segments provided. click on the segment number and you will get the data.
Thanks and Regards,
Raghavan -
Can field names not start with a single letter camel case?
I am using Hibernate 3.6, JPA 2.0, and Spring 3.0.6. I have fields in my objects like the following:
class PersonContact {
Long eAddressCpId;
ElectronicAddress eAddress;
I use field access (in my orm files) and queries/inserts/etc work without an issue. The fields are both in the class as well as in the orm files. But on startup of the application, the JPA configuration load spits out warnings:
2011-02-22 15:38:10,785 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.contactpoint.ElectronicAddress.eAddress not found in class but described in <mapping-file/> (possible typo error)
2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
If I change my field names to be from eAddress to electronicAddress and eAddressCpId to electronicAddressCpId , then I don't get these warnings.
Is there requirements around the field names?
Thanks..jayHi,
If you have this PersonContact.eAddress in your mapping file, Hibernate will look in PersonContact for
1 a public field called eAddress
2 a public member method called getEAddress (Or geteAddress).
3 a public member method called isEAddress(Or isAddress)
Your fields aren't public, so my guess is that getEAddress is found. From this "get" is stripped away and the rest is "decapitalized".
This decapitalize method has these lines:
if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
Character.isUpperCase(name.charAt(0))){
return name;
}So yes, I think there is a requirement with fields names. (Or rather getter names, since fields aren't decapitalized)
You could try and change your mapping file into PersonContact.EAddress to see if I'm right.
Btw, I am not a Java programmer, so this is what I could manage from a poor mans view at this (Open) source of Hibernate's.
Regards
Peter -
Getting an object's field name
In the snippet of code shown below, 'parent' represents a UI dialog, and 'child' represents one of the components of the dialog. What I would like to know is the field name of 'child'. The variable 'fieldName' would contain the name I am seeking, if I knew how to determine the value of 'ii' that corresponds to the object 'child'.
I hope you can help.
Thanks,
Miguel
String getFieldName(Object parent,Component child) {
Class cl = parent.getClass();
Field [] fields = cl.getDeclaredFields();
String fieldName = fields[ii].getName();
// problem: how to get 'ii' that corresponds to 'child'?
return fieldName;
}Is there a way to get the
corresponding array of component objects? It depends on the way the "parent" class is defined.
For example (a BAD example, but an example):
I could have the parent keep it's components in a HashMap, with a key of the component type and a value of an ArrayList that contains each component matching the component type.
This would be very annoying to deal with, and hard to find any given component (whether reflectively or with normal code).
If I can get
the value of a field (Object val =
field.get(parent);), there must be a way to get the
reference to the object that correspond to the pair
'field','parent'.
Thanks.Huh?
What do you think field[1].get(parent) returned?
It's the value that the field is referring to (e.g. the actual object refered to by the field).
I think dubwai's questions about "what are you trying to do" are very relevant. Using reflection like this usually means the design is lacking some important functionality -
Field names are not coming in file when dloaded frm apserv to prserv
Here i'm dloading data to Appserver..frm there data is dloading to pre server..but fieldnames are downloading...i am working in 4.6c version.same code is working in ECC version...Plzz give me a suggestion...
FORM dload_file_from_server USING p_srfname "#EC *
p_fname "#EC *
p_psfile "#EC *
p_flag.
DATA: lv_fname TYPE string.
CASE p_flag.
WHEN 'MSEG'.
ASSIGN it_fn TO <fn>.
ASSIGN wa_fn TO <fn_wa>.
ASSIGN it1_mseg TO <fs>.
ASSIGN wa1_mseg TO <fs_wa>.
ASSIGN p_srfname TO <fs_fname>.
CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
WHEN 'MKPF'.
ASSIGN it_fn TO <fn>.
ASSIGN wa_fn TO <fn_wa>.
ASSIGN it1_mkpf TO <fs>.
ASSIGN wa1_mkpf TO <fs_wa>.
ASSIGN p_srfname TO <fs_fname>.
CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
WHEN OTHERS.
ENDCASE.
OPEN DATASET <fs_fname> FOR INPUT IN TEXT MODE ENCODING DEFAULT.
READ DATASET <fs_fname> INTO <fn_wa>.
APPEND <fn_wa> TO <fn>.
DO.
IF sy-tabix GE 1.
READ DATASET <fs_fname> INTO <fs_wa>.
IF sy-subrc = 0.
APPEND <fs_wa> TO <fs>.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDDO.
CLOSE DATASET <fs_fname>.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_fname
filetype = 'ASC'
trunc_trailing_blanks = 'X'
trunc_trailing_blanks_eol = 'X'
TABLES
data_tab = <fs>
fieldnames = <fn>.
IF sy-subrc <> 0. "#EC
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: <fn>, <fn_wa>.
ENDFORM. " dload_file_from_server
Please use code tags - it makes your code easier to read
Edited by: Rob Burbank on Dec 6, 2010 4:00 PMHi,
I think for 4.6 C <fn> must be declared as an internal table and the field names should be given as records and not as one single record.
the fieldnames internal table should contain records as :
Field1
Field2 .... and not as Field1 Field2 ....
Regards,
Srini. -
How to return all field names in a table
How do you write a report to return all field names in a table? I prefer the field names in a column.
Thanks
WayneHi,
In Oracle it is,
Select column_name from user_tab_cols where table_name = 'Table_Name';
Note: Table_Name should be in capital letters
In MS SQL Server it is,
SELECT Column_Name + ', '
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Table_Name'
Hope this helps!
Thanks
-Azhar -
How to rename the column field names
hello guys,
i am retrieving my field names from the database and i view it thru HTML.
When i view it,the column names are those which are given while creating tables.
Ex..
fname,lname,phno,
i want it as First Name,Last Name,Phone Number etc ...<%
try {
stmt = con.createStatement();
sql="SELECT fname, lname, gender, email,phnum,sartweblink, sartaddress1, sartaddress2,sartcounty, country,sartpostcode,dob FROM Artist where artistid='" + sartid + "'";
rs=stmt.executeQuery(sql);
rsmd=rs.getMetaData();
int colcount=rsmd.getColumnCount();
for(i=1;i<=colcount;i++)
%>
<tr><td width="200"><FONT face=verdana size=2><%= rsmd.getColumnName(i)%>
<%
%> </FONT>
<font face=verdana size=2>
<% while(rs.next())
fname=rs.getString("fname");
lname=rs.getString("lname");
gender=rs.getString("gender");
email=rs.getString("email");
phnum=rs.getInt("phnum");
weblink=rs.getString("sartweblink");
address1=rs.getString("sartaddress1");
address2=rs.getString("sartaddress2");
county=rs.getString("sartcounty");
country=rs.getString("country");
postcode=rs.getString("sartpostcode");
dob=rs.getString("dob");
%>i make use of metadata..
can anyone tell me how to do this..
thanks in advancewhy not use alias:
your query is
SELECT fname, lname, gender, email
and will be:
SELECT fname FIRSTNAME, lname LASTNAME, gender GENDER, email EMAILADDRESS -
How to find the field name of variable system information on SAP B1
Hi All,
I recently wanted to create a simple SQL query to list all ITEM MASTER DATE where the weight is blank. This is so i can get a list of all items with the weight information missing from the system to investigate.
It turns out the weight field within the SALES DATA tab is a system variable. When i pull the OITM table up within the query generator i can not identify where this variable name come up without guessing which can give me the wrong information.
Can someone point me into the direction on how to assisocate variable to a field name within SAP B1. This is also another problem if i wanted to display variable within Crystal report layout.
RegardsHi Nick Dang,
Try This
SELECT T0.[ItemCode], T0.[ItemName], T0.[SalUnitMsr], T0.[SHeight1], T0.[SWidth1], T0.[SLength1], T0.[SVolume], T0.[SWeight1] FROM OITM T0 WHERE T0.[ItemCode] =[%0]
Thanks,
Srujal Patel -
Hi Experts,
What r the table names and field names for
FLSA Description
Stock Option Eligible
Career Level
Full time/Part time> Full time/Part time--> T503T-PSERK
~Suresh -
Hi All,
I got some output values from the legacy system with me but need to know whats the actual field name and table name to which i need to transfer these values. How can i do it, since which theres is not field name or despcription given for the data.
Is there any way i can do it.
Points will be rewarded for all useful answers.
Regards
ABif you know the transaction code you use to post the uploaded data in SAP, you just need to do BDC recording in using transation SM35. Record the whole process and create a program from the recording... and you wont even need to know the tables and field names-- almost everything will be done for you....
All you need to do is replace record data with upload data.
You can also try to look for a standard Function Module / BAPI which can do the processing for you and provide it with a table containing the upload data ...
Reward points if useful -
hi frds
Give me table name and field name of OPEN PO QUANTITY ..
thanks
Pari Vendhan.RSee the sample code for the open PO's based on Vendor
and do accordingly
*& Report ZMM_PO_REPORT
REPORT ZMM_PO_REPORT message-Id yb
NO STANDARD PAGE HEADING
LINE-COUNT 60(1)
LINE-SIZE 230.
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: lfa1, " Vendor Master
t161, " PO Doc Types
t024, " Purchase Groups
ekko. " PO Header
T Y P E S D E C L A R A T I O N S
Purchase Orders Main Structure
TYPES: BEGIN OF s_po,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
bstyp TYPE bstyp, " PO Category
bukrs TYPE bukrs, " Company Code
bsart TYPE bbsrt, " PO Type
lifnr TYPE lifnr, " Vendor No
ekgrp TYPE bkgrp, " Purchase Group
waers TYPE waers, " Currency
bedat TYPE etbdt, " PO Date
txz01 TYPE txz01, " Material Text
werks TYPE ewerk, " Plant
lgort TYPE lgort_d, " Storage Location
matkl TYPE matkl, " Material Group
menge TYPE bamng, " PR Quantity
meins TYPE bamei, " UOM
bprme TYPE bbprm, " Price Unit
netpr TYPE netpr, " Net price
peinh TYPE peinh, " Price Unit UOM
pstyp TYPE pstyp, " Item Category
knttp TYPE knttp, " Account Assignment Category
END OF s_po.
Purchase Orders History Structure
TYPES: BEGIN OF s_account,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
gjahr TYPE mjahr, " Fiscal Year
belnr TYPE mblnr, " PO Invoice No
menge TYPE menge_d, " PR Quantity
wrbtr TYPE wrbtr, " Price in Local Currency
dmbtr TYPE dmbtr, " Price in Foreign Currency
waers TYPE waers, " Currency
shkzg TYPE shkzg, " Dr/Cr Indicator
END OF s_account.
Purchase Orders History Structure(Item Sum)
TYPES: BEGIN OF s_inv_sum,
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
menge TYPE menge_d, " PR Quantity
wrbtr TYPE wrbtr, " Price in Foreign Currency
waers TYPE waers, " Currency
END OF s_inv_sum.
Purchase Orders Main Structure
TYPES: BEGIN OF s_rep,
lifnr TYPE lifnr, " Vendor No
ebeln TYPE ebeln, " PO No.
ebelp TYPE ebelp, " PO Item
bstyp TYPE bstyp, " PO Category
bsart TYPE bbsrt, " PO Type
ekgrp TYPE bkgrp, " Purchase Group
waers TYPE waers, " Currency
bedat TYPE etbdt, " PO Date
txz01 TYPE txz01, " Material Text
werks TYPE ewerk, " Plant
lgort TYPE lgort_d, " Storage Location
matkl TYPE matkl, " Material Group
menge TYPE bamng, " PR Quantity
meins TYPE bamei, " UOM
bprme TYPE bbprm, " Price Unit
netpr TYPE netpr, " Net price
peinh TYPE peinh, " Price Unit UOM
pstyp TYPE pstyp, " Item Category
knttp TYPE knttp, " Account Assignment Category
name1 TYPE name1, " Plant
orewr TYPE netpr, " To be Invoiced Price
curr TYPE waers, " Inv Doc Currency
END OF s_rep.
D A T A D E C L A R A T I O N S
DATA: gv_title1 TYPE sylisel, " Report title
gv_dial. " Color flag
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag X
c_h VALUE 'H', " Debit
c_vgabe TYPE vgabe VALUE '2'. " Transaction Type
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_po TYPE STANDARD TABLE OF s_po WITH HEADER LINE,
" Purchase Order
i_inv TYPE STANDARD TABLE OF s_inv_sum WITH HEADER LINE,
" PO Invoice Values
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE,
" PO Invoice Values
i_ekbe TYPE STANDARD TABLE OF s_account WITH HEADER LINE.
" PO Invoice Values
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kred,
s_ebeln FOR ekko-ebeln MATCHCODE OBJECT mekk,
s_bsart FOR t161-bsart,
s_ekgrp FOR t024-ekgrp,
s_bedat FOR ekko-bedat.
SELECTION-SCREEN END OF BLOCK b1.
I N I T I A L I Z A T I O N *
INITIALIZATION.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_screen.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P - O F - P A G E *
TOP-OF-PAGE.
Header of the List
PERFORM header.
E N D - O F - P A G E *
Footer
END-OF-PAGE.
ULINE.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
Display the Report Output data
PERFORM display_data.
At Line-Selection
AT LINE-SELECTION.
When double clicked on EBELN display the details of Purchase Doc
PERFORM line_sel.
*& Form validate_screen
Validation of Selection Screen fields
FORM validate_screen .
Validation of Vendor Number
CLEAR lfa1-lifnr.
IF NOT s_lifnr[] IS INITIAL.
SELECT lifnr UP TO 1 ROWS
INTO lfa1-lifnr
FROM lfa1
WHERE lifnr IN s_lifnr.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Vendor'(002).
ENDIF.
ENDIF.
Validation of PO Number
CLEAR ekko-ebeln.
IF NOT s_ebeln[] IS INITIAL.
SELECT ebeln UP TO 1 ROWS
INTO ekko-ebeln
FROM ekko
WHERE ebeln IN s_ebeln.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Document Number'(003).
ENDIF.
ENDIF.
Validation of PO Document Type
CLEAR t161-bsart.
IF NOT s_bsart[] IS INITIAL.
SELECT bsart UP TO 1 ROWS
INTO t161-bsart
FROM t161
WHERE bsart IN s_bsart.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Purchase Document Type'(004).
ENDIF.
ENDIF.
Validation of Purchasing Group
CLEAR t024-ekgrp.
IF NOT s_ekgrp[] IS INITIAL.
SELECT ekgrp UP TO 1 ROWS
INTO t024-ekgrp
FROM t024
WHERE ekgrp IN s_ekgrp.
ENDSELECT.
IF sy-subrc 0.
MESSAGE e000 WITH 'Invalid Purchasing Group'(005).
ENDIF.
ENDIF.
ENDFORM. " validate_screen
*& Form fetch_data
Fetching the PO related data from Database Tables
FORM fetch_data .
CLEAR i_po.
REFRESH i_po.
SELECT a~ebeln " PO No.
b~ebelp " PO Item
a~bstyp " PO Category
a~bukrs " Company Code
a~bsart " PO Type
a~lifnr " Vendor No
a~ekgrp " Purchase Group
a~waers " Currency
a~bedat " PO Date
b~txz01 " Material Text
b~werks " Plant
b~lgort " Storage Location
b~matkl " Material Group
b~menge " PR Quantity
b~meins " UOM
b~bprme " Price Unit
b~netpr " Net price
b~peinh " Price Unit UOM
b~pstyp " Item Category
b~knttp " Account Assignment Category
INTO TABLE i_po
FROM ekko AS a JOIN ekpo AS b
ON a~ebeln = b~ebeln
WHERE a~ebeln IN s_ebeln AND
a~lifnr IN s_lifnr AND
a~ekgrp IN s_ekgrp AND
a~bsart IN s_bsart AND
a~bedat IN s_bedat.
SORT i_po BY ebeln ebelp.
break-point.
IF NOT i_po[] IS INITIAL.
Fetch the PO History/Invoice Details from EKBE Table
CLEAR i_ekbe.
REFRESH i_ekbe.
SELECT ebeln " PO No.
ebelp " PO Item
gjahr " Fiscal Year
belnr " PO Invoice No
menge " PR Quantity
wrbtr " Price in Local Currency
dmbtr " Price in Foreign Currency
waers " Currency
shkzg " Dr/Cr Indicator
INTO TABLE i_ekbe
FROM ekbe
FOR ALL ENTRIES IN i_po
WHERE ebeln = i_po-ebeln AND
ebelp = i_po-ebelp AND
vgabe = c_vgabe.
IF sy-subrc = 0.
SORT i_ekbe BY ebeln ebelp.
LOOP AT i_ekbe.
IF i_ekbe-shkzg = c_h.
i_ekbe-wrbtr = i_ekbe-wrbtr * -1.
ENDIF.
MODIFY i_ekbe.
ENDLOOP.
break-point.
Sum up the Item wise Invoice totals
LOOP AT i_ekbe.
AT END OF ebelp.
READ TABLE i_ekbe INDEX sy-tabix.
SUM.
MOVE-CORRESPONDING i_ekbe TO i_inv.
APPEND i_inv.
ENDAT.
CLEAR i_inv.
ENDLOOP.
SORT i_inv BY ebeln ebelp.
break-point.
ENDIF.
ENDIF.
Move the Vendor Name and Invoice Values to I_rep Internal Table
LOOP AT i_po.
MOVE-CORRESPONDING i_po TO i_rep.
CLEAR i_inv.
READ TABLE i_inv WITH KEY ebeln = i_po-ebeln
ebelp = i_po-ebelp.
IF sy-subrc = 0.
i_rep-orewr = ( i_po-menge - i_inv-menge ) * i_po-netpr.
i_rep-curr = i_inv-waers.
ELSE.
i_rep-orewr = i_po-menge * i_po-netpr.
i_rep-curr = i_po-waers.
ENDIF.
break-point.
Get the Vendor Name
CLEAR lfa1-name1.
SELECT SINGLE name1 FROM lfa1 INTO lfa1-name1
WHERE lifnr = i_po-lifnr.
IF sy-subrc = 0.
i_rep-name1 = lfa1-name1.
ENDIF.
APPEND i_rep.
CLEAR i_rep.
break-point.
ENDLOOP.
SORT i_rep BY lifnr ebeln ebelp.
DELETE i_rep WHERE orewr LE 0.
break-point.
ENDFORM. " fetch_data
*& Form display_data
Display the Report Output data
FORM display_data .
DATA: lv_flag, " New Flag
lv_rec TYPE i. " No of Records
CLEAR lv_rec.
IF i_rep[] IS INITIAL.
MESSAGE e000 WITH 'No Data found'(022).
ELSE.
LOOP AT i_rep.
Toggle Color
PERFORM toggle_color.
IF lv_flag space.
NEW-LINE.
ENDIF.
At New Purchase Document
AT NEW ebeln.
WRITE:/1 sy-vline, 2(10) i_rep-ebeln INTENSIFIED OFF.
lv_flag = c_x.
lv_rec = lv_rec + 1.
ENDAT.
WRITE: 1 sy-vline,
12 sy-vline,13(4) i_rep-bsart,
17 sy-vline,18(10) i_rep-lifnr,
28 sy-vline,29(35) i_rep-name1,
64 sy-vline,65(4) i_rep-ekgrp,
69 sy-vline,70(10) i_rep-bedat,
80 sy-vline,81(5) i_rep-ebelp,
86 sy-vline,87(40) i_rep-txz01,
127 sy-vline,128(9) i_rep-matkl,
137 sy-vline,138(1) i_rep-pstyp,
139 sy-vline,140(1) i_rep-knttp,
141 sy-vline,142(4) i_rep-werks,
146 sy-vline,147(4) i_rep-lgort,
151 sy-vline,152(13) i_rep-menge UNIT i_rep-meins,
165 sy-vline,166(3) i_rep-meins,
169 sy-vline,170(15) i_rep-netpr CURRENCY i_rep-waers,
185 sy-vline,186(4) i_rep-waers,
190 sy-vline,191(5) i_rep-peinh,
196 sy-vline,197(4) i_rep-bprme,
201 sy-vline,202(15) i_rep-orewr CURRENCY i_rep-curr,
217 sy-vline,218(4) i_rep-curr,
222 sy-vline,223(7) i_rep-bstyp centered,
230 sy-vline.
NEW-LINE.
hide: i_rep-ebeln.
ENDLOOP.
ULINE.
FORMAT COLOR OFF.
WRITE : /2 'Total Number of Purchasing Documents:'(025) COLOR 3,
lv_rec COLOR 3.
ENDIF.
ENDFORM. " display_data
*& Form header
Write the Report Header
FORM header .
FORMAT RESET.
header
WRITE:/1(230) 'LIST OF PURCHASE DOCUMENTS PER VENDOR'(006) CENTERED.
SKIP.
FORMAT COLOR COL_HEADING.
ULINE.
WRITE:/1 sy-vline,2(10) 'Pur.Doc.No'(006) CENTERED,
12 sy-vline,13(4) 'Type'(007),
17 sy-vline,18(10) 'Vendor'(008) CENTERED,
28 sy-vline,29(35) 'Name'(009) CENTERED,
64 sy-vline,65(4) 'PGrp'(010) CENTERED,
69 sy-vline,70(10) 'Doc.Date'(012) CENTERED,
80 sy-vline,81(5) 'Item'(011),
86 sy-vline,87(40) 'Material Short Text'(024) CENTERED,
127 sy-vline,128(9) 'Mat.Group'(013),
137 sy-vline,138(1) 'I',
139 sy-vline,140(1) 'A',
141 sy-vline,142(4) 'Plnt'(014),
146 sy-vline,147(4) 'SLoc'(015),
151 sy-vline,152(13) 'Quantity'(016) CENTERED,
165 sy-vline,166(3) 'UoM'(017),
169 sy-vline,170(15) 'Net Value'(018) CENTERED,
185 sy-vline,186(4) 'Curr'(019),
190 sy-vline,191(5) 'Per'(020),
196 sy-vline,197(4) 'Unit'(021),
201 sy-vline,202(15) 'To be Invoiced'(023) CENTERED,
217 sy-vline,218(4) 'Curr'(019),
222 sy-vline,223(7) 'Doc.Cat'(026),
230 sy-vline.
ULINE.
ENDFORM. " header
*& Form toggle_color
This routine alters the color of the records in the list FORM toggle_color.
IF gv_dial = space.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
gv_dial = c_x.
ELSE.
FORMAT COLOR 1 INTENSIFIED OFF.
CLEAR gv_dial.
ENDIF.
ENDFORM. " toggle_color
*& Form LINE_SEL
*When double clicked on EBELN field display the details of Purchase Doc
FORM line_sel.
CASE sy-lsind.
WHEN '1'.
DATA: lv_field(20),
lv_value(10),
lv_bstyp like i_rep-bstyp.
clear: lv_bstyp,lv_value, lv_field.
GET CURSOR FIELD lv_field VALUE lv_value.
IF lv_field = 'I_REP-EBELN'.
IF NOT lv_value IS INITIAL.
READ LINE sy-index FIELD VALUE i_rep-bstyp
INTO lv_bstyp.
READ CURRENT LINE FIELD VALUE i_rep-bstyp INTO lv_bstyp.
if lv_bstyp = 'F'.
SET PARAMETER ID 'BES' FIELD lv_value.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
elseif ( lv_bstyp = 'K' or lv_bstyp = 'L' ).
SET PARAMETER ID 'VRT' FIELD lv_value.
CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
elseif lv_bstyp = 'A'.
SET PARAMETER ID 'ANF' FIELD lv_value.
CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.
endif.
ENDIF.
ENDIF.
ENDCASE.
ENDFORM. " line_sel{code]
<REMOVED BY MODERATOR>
kushagra
Edited by: Alvaro Tejada Galindo on Feb 18, 2008 2:03 PM -
Schedule line- Delivery Qty Field Name
Hi All,
I need to know the Delivery Qty Field Name in Schedule Line in Order .from the system I took rv45a stru name. But I want to know exact table name and Field Name .
If it is not stored Directly, then I need to Know how to calculate Delivery Qty.
With Regards,
Neptune.MHi,
LIPS-LFIMG - Actual quantity delivered (in sales units)
It is in LIPS table pass VBELN AND POSNN to obtain
SELECT SINGLE * FROM LIPS
WHERE VBELN = DTAB-VBELN
AND POSNR = DTAB-POSNN.
IF SY-SUBRC EQ 0.
MOVE : LIPS-LFIMG TO DTAB-LFIMG.
MODIFY DTAB.
ENDIF.
Reward points if useful
Lakshmiraj -
The contained field name "ADTAGR" does not exist in any of the database tab
hı all
how can l solved thıs problem
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
not caught in
procedure "PUT_QMFECAT" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
An Open SQL clause was specified dynamically. The contained field name
"ADTAGR" does not exist in any of the database tables from the FROM clause.
Information on where terminated
Termination occurred in the ABAP program "SAPDBZQNQ" - in "PUT_QMFECAT".
The main program was "ZQMR_BILDIRIM ".
In the source code you have the termination point in line 732
of the (Include) program "SAPDBZQNQ".
Error occurred during batch input processing
The termination is caused because exception "CX_SY_DYNAMIC_OSQL_SEMANTICS"
occurred in
procedure "PUT_QMFECAT" "(FORM)", but it was neither handled locally nor
declared
in the RAISING clause of its signature.
The procedure is in program "SAPDBZQNQ "; its source code begins in line
715 of the (Include program "SAPDBZQNQ ".
FORM put_qmfecat.
DATA: l_tab_fields TYPE rsfs_tab_fields.
DATA: l_ds_clauses TYPE rsds_where.
Dynamische Feldselektion
MOVE 'QMFECAT_C' TO l_tab_fields-tablename.
READ TABLE select_fields WITH KEY l_tab_fields-tablename
INTO l_tab_fields.
IF sy-subrc <> c_rc00.
CLEAR l_tab_fields.
ENDIF.
Dynamische Selektionskriterien
MOVE 'QMFECAT' TO l_ds_clauses-tablename.
READ TABLE dyn_sel-clauses WITH KEY l_ds_clauses-tablename
INTO l_ds_clauses.
DB-Zugriff
>>>>> SELECT (l_tab_fields-fields) FROM qmfe
INTO CORRESPONDING FIELDS OF TABLE qmfecat_tab
WHERE qmnum = rqmqmel-qmnum
AND kzloesch = space
AND (l_ds_clauses-where_tab)
ORDER BY PRIMARY KEY.
regard sinan
Edited by: eyup_sinan on Jan 6, 2012 3:21 PM
Edited by: eyup_sinan on Jan 6, 2012 3:30 PMYou seem to have made a copy of the standard program. You'll have to make sure that you are handling this field correctly in your code.
Rob
Maybe you are looking for
-
I have a Iphone 3gs and a Iphone 4, I want to be able to restore all my settings from the 3GS to the 4, is this possible? I tried to retore to the Iphone 4 and it tells me it is to new a hardware, I will hate to setup everything again, hopefully some
-
can you delete / remove old apps from the purchased section in the update bit in the app store?
-
Hello All, I'm trying to map and 850 Idoc to EDI. I'm having issues with PO1 Baseline Item Data . I'm trying to pass more information to 1) PO107 based on PO106 Ex : IF PO106 = 'VN' then PO107 = "Vendor's (Seller's) Item Number" 2) PO109 based on PO
-
Hello, In July I can get BT Infinity 80/20 or TalkTalk 80/20 now TalkTalk uses BTs Fibre Network so there would be no diffence in speed, so what do you think I should do TalkTalk is probably cheaper. And if I go with TalkTalk I will probably buy the
-
Corruption of the Location of Referenced Images
In other threads we have discussed problems with Aperture becoming confused about which referenced files it is supposed to connect with. Here is my analysis of one aspect of this problem. When you have a group of referenced files, if you move some of