Need logic in abap-hr
Hi
I have a requirement that employee can display,edit,view and confirm his personel data i.e first name,last name.dob etc.
Requirement is:
need 4 tabs :1 for display data,1 for edit, 1 for review and 1 for confirm.
here using bapis for getting data and to change data.
Need help that what's the infotypes,tables involved here and what's the exact logic.
Points are assured for correct answers.
Regards,
Sree
Hi Sreeram,
Employee personal data is held in infotype number 0002.
The database table @ the back end is PA0002.
However in HR you do not update infotypes via direct DB update, rather we have function modules for the same:
Display Data (extracting personal data from infotype 0002) use function module HR_READ_INFOTYPE
Update Data into infotype 0002 for a employee use function module HR_INFOTYPE_OPERATION.
Cheers,
Aditya
Similar Messages
-
Need informations about abap-hr
Hi Guys,
I need ebooks on ABAP HR. or some useful documents about abap-hr.
Logical databases / Infotypes/Macros..etc
Anybody can send me . It's important.
Thankshi,
You can gothrough the below links.
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports,I
http://www.sap-img.com/human/hr-faq.htm
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.hernangn.com.ar/sap.htm
http://www.planetsap.com/hr_abap_main_page.htm
Thanks,
-Suresh Revuru -
Do I need Logic Pro 8.0.1 Update, and if so, how do I get it now?
Do I need Logic Pro 8.0.1 Update, and if so, how do I get it now?
Tuesday, 2008-07-29
Due to prolonged illness, I purchased the Logic Studio Upgrade version (I already had Logic Pro 7.2.3, with dongle) only last week. Logic Studio Upgrade version initially installs Logic Pro version 8.0.0. I then dutifully set out to download both the Logic Pro 8.0.1 Update and the Logic Pro 8.0.2 Update.
As of this week, all attempts and maneuvers to simply get the Logic Pro 8.0.1 Update have failed. I cannot even find it, let alone download it!
Yes, I've tried the relabeling juggling act to fool Software Update into eventually listing and providing both the Logic Pro 8.0.1 Update and the Logic Pro 8.0.2 Update—but no luck, not any longer. These moves may have worked up until relatively recently, but they do not work now, at least as of this week.
All searching of Apple's site(s) and Support pages results in nada—Apple itself no longer lists any such file/dmg/download/update anywhere! All previous links are either dead or just dump one back on to the Logic Pro 8.0.2 Update page.
(In my many searches, I noted what seemed to me to be a majority of opinion that the Logic Pro 8.0.1 Update was a dog, especially in Mac OS X Leopard 10.5.2 or 10.5.3. Many users reported crashes, panics, and.or freezes. Is this why Apple has pulled the update and rendered it extinct?)
I Googled, I Asked Why, I Cuiled—but no Logic Pro 8.0.1 Update, except as that which lurked in the murky warez waters. Still, frustrated as I was, I did even try all such I could find . . . but no third party-hosted update worked at all.
I am concerned because in all my previous experience with Apple and its applications, ample information is made readily available about the contents of any update and an explanation of its relationship to previous updates. By this latter I mean: Apple indicates that update "x" incorporates the previous updates "u" and "v"; therefore one can proceed safely to install update "x" even if one missed updates "u" and "v" or for whatever reason did not install them.
So . . . do I need Logic Pro 8.0.1 Update, if I am then going to further update with the Logic Pro 8.0.2 Update? Does Logic Pro 8.0.2 Update incorporate the changes made in Logic Pro 8.0.1 Update? Will I be missing (critically?) something(s) in Logic Pro 8.0.1 Update if I in fact do not ever get it or install it? And how would I know? Apple has not only removed the update and all traces of it, but Apple has also removed all information about Logic Pro 8.0.1 Update—it is now literally as if it never existed.
So what's a po' boy to do? Logic Pro 8.0.1 Update cannot now be found on VersionTracker or MacUpdate or anywhere else. To date, no user group or organization or educational institution or program or audio-related company posted it or archived it.
Where/how can I get a copy of the Logic Pro 8.0.1 Update?
If I can't, what do I do?
If I can't, what do I miss?
And where is Apple's support for Logic Studio/Logic Pro in all of this?
Earnestly hoping,
j.Rodger,
Thank you for your gracious welcome . . .
and thank you for your swift response . . .
and thank you for your information (and encouragement!).
Yes, I read that too, but searched in vain for the specifity of, say, your direction:
"Go ahead and update to 8.0.2, as it contains the 8.0.1 update."
So I shall!
Again, many thanks. -
Need logic for calculate the balance quantity in open sales order
hi all
i need logic to calcuclate the balance quantity in open sales order ,
where i am using VBAK header and VBAP item , and VBFA for document flow tables
i need to have the balance quantity , for the open sales order
especially taking with respect to VBFA-VBTYP_N = M for invoice creation and N for canellation
any one please help methank you but i am clear abt it
will you please anyother way to calucaluate the logic ,
and i need to populate in bukets also for the terms of 5 years
Edited by: sridhar loganathan on Nov 25, 2008 6:43 AM -
Need to write ABAP Routine at infopackage Selection Options
Hi All,
I need to write ABAP Routine at Info Package Selection Options.
Requiremnet i need to bring some Sales Document Types (Sales Orders Types) only from R/3.
Ex I need OrderTypes ZQT,ZSIV etc
Can any body help to resolve this.
Regards,
P.C.V.Hi P.C.V,
If the order type field is already available in the Data Selection Tab of the InfoPackage, then you just need to place your selections there (e.g. order type = ZQT, ZSIV) without the need to use ABAP routines.
If ever you really need an ABAP routine, here is an example ABAP routine. The most important concept is to modify the range table l_t_range so that the selection reflect what you need.
data: l_idx like sy-tabix.
data: w_startdate like sy-datum,
w_startweek like scal-week,
w_maxdate like sy-datum,
w_maxweek like scal-week.
w_startdate = sy-datum.
w_maxdate = w_startdate + 104 * 7.
* Calculate horizon for extraction
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = w_startdate
IMPORTING
WEEK = w_startweek
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = w_maxdate
IMPORTING
WEEK = w_maxweek
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
read table l_t_range with key
fieldname = 'CALWEEK'.
l_idx = sy-tabix.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = w_startweek.
l_t_range-high = w_maxweek.
modify l_t_range index l_idx. -
Need to create ABAP proxy in ECC 6.0
Hi All,
I need to create Abap proxy in ECC 6.0 .Tha actual senerio is iam getting data from XI in XML format and i need to validate and update the date in the ZEE table fields respectively.i need to Modularize the class and keep the validation part separate. we should do validation framework for custom Master Data objects which can be turned On and Off. This can be used as a common framework for all master data validations.can any one guide me how to create abap proxy from staring till end ...Thanks in advance ...
Regards,
SRIramHi,
I got these below steps from SDNforumonly ..i do not have the link however i have the steps:
1.check Delivered Languages service.sap.com/languages.
2.check note 42305
3.In transaction SMLT , Choose Classify Language (Language symbol or F5 )
4.Supplement this language with English or German (Recommended)
5.The language must be defined in the instance profiles so that you can log on in these languages. The relevant parameter is
zcsa/installed_languages.
6.Go to the language for which you want to install extra packages and choose or choose Language --> Import Package
7.in the next screen , enter the path for language packages.
8.start immediately or schedule it .Optionally you can use the target server to exceute this ( to avoid performance issues
,if you are importing in production timings, and you cna exculde this server from logon group )
9.if any problems in importing then analyze the log and restart the import .
10.After importing the languages, you must also import the language data in the Support Packages.Choose Language --->
Special Actions ---> Import Support Packages
11.Go to the language that you want to supplement and choose or Language ---> Supplement Language(this is client specific ,
so execute for each client in your system)
And also to the above if your system is running on non unicode you need to install the code pages (example AIX locale command) .
Thanks. -
Hi folks,
I need faqs on ABAP HR (with answers). Could any body send me some material to attend interview on ABAP HR.Please i want with ansers as i amvery new to ABAP HR.
Thanks,
Shyam.Shyam,
your question not lie under
rules of engegement
there is plenty of thread of question in HR are they not question in itself you need to watch them.
Amit. -
Need documents of ABAP Object Oriented concepts
Hi,
I need materials on ABAP Object Oriented Concepts to learn.
If you have any good documents which covers all the topics of ABAP OO then please send me to [email protected]
Thanks in advance.
Regards,
ChandruChandra,
Very good sites with docs.
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
Pls. reward if useful... -
MD5sum Checksum Logic in ABAP interface
Hi All..
I am Pavan, ABAP Consultant from Bangalore, India....
How to incorporate MD5sum checksum logic in ABAP interface...???
FYI, MD5sum is a checksum tool available in the web. This tool will generate a unique No' for each flatfile downloaded from SAP via extracts..
When i send the same flat file to my client, they will validate the checksum again.. Once it is validated, then it will be confirmed that data is not tampered... Otherwise, client will reject the file..
This is a mandatory process for my client, since they are working as per SOXa standards... (Sarbanes - Oxley Controls & Process)
Please help me, if any one of you have the information regarding this ..
Thanks in Advance......
Regards
Pavan Sanganal
Bangalore, India
Email : [email protected]Hi,
assuming you have the content in the well known table
sdokcntbins, the following snippet may became useful:
DATA:
input_length TYPE i,
hash TYPE hash160,
data TYPE xstring.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = input_length
IMPORTING
buffer = data
TABLES
binary_tab = p_file_content_binary.
CALL FUNCTION 'CALCULATE_HASH_FOR_RAW'
EXPORTING
alg = 'MD5'
data = data
IMPORTING
hash = hash.
Best regards,
Stefan -
Hello,
I want to convert following logic in ABAP.
if i_out-belnr is between 90000000 and 99999999.
endif.You can do this...
data: r_belnr type range of belnr,
wa_belnr like line of r_belnr.
data: belnr type belnr.
wa_belnr-low = '90000000'.
wa_belnr-high = '99999999'.
wa_belnr-sign = 'I'.
wa_belnr-option = 'BT'.
append wa_belnr to r_belnr.
if i_out-belnr in r_belnr.
endif. -
Hi Experts
I am having a list of TAXCODES like.
"CA" "CC" "CD" "DA" "DE" "WS"
Now in purchase orders if i am having different line items having the above TAX CODES.
i need to pass a variable &XXX& which is having text to sap script form.
And if the Purchase order having line items which is having one of the taxcode above for one line item and the other line item having diifferent taxcode like V0 etc { for these case i dont need to send text data }
and if the PO having one tax code for all line items.{ i need to send the data }
how to achive this
i am trying in this way
SELECT ebeln
ebelp
mwskz "Tax code
FROM ekpo
INTO TABLE lt_ekpo
WHERE ebeln = v_ebeln
AND mwskz in r_mwskz
AND loekz = ''.
DESCRIBE TABLE lt_ekpo LINES lv_count.
lt_ekpo1[] = lt_ekpo[].
SORT lt_ekpo1 BY ebelp DESCENDING.
READ TABLE lt_ekpo1 INTO wa_ekpo INDEX 1.
v_ebelp1 = wa_ekpo-ebelp.
CLEAR wa_ekpo.
LOOP AT lt_ekpo INTO wa_ekpo.
IF sy-tabix = 1.
lv_taxcode = wa_ekpo-mwskz.
ELSE.
IF lv_taxcode NE wa_ekpo-mwskz.
lv_diff_tax = 'X'.
if lv_taxcode EQ 'CA' or lv_taxcode EQ 'CC' or lv_taxcode EQ 'CD' OR lv_taxcode EQ 'DA' OR lv_taxcode EQ 'DE' or lv_taxcode EQ 'WS'.
ELSE.
ENDIF.
ENDIF.
please provide the logic for the above case.
Edited by: suribabu124 on Apr 26, 2010 4:13 PMhi
this can be done using rages
Regards
Suresh -
I am facing problem in abap program.
Requirement :
i want to print the data like this
delivery no- item- from batch- to batch - material shade- no of cones- netwt- grosswt- no of bags.
delivery no & item from lips-vbeln lips-uecha field table.
against this i will be having no of batch in lips-charg field.
batches may be in order or may not be there.
Against this each batch i will get shade, no of cones, netwt, grosswt, from batch classification.
mch1,ausp table.
on change of any of the above items or batch order i must print it with a new line.
example.
say supose if delivery 100 item 10 contains ABC001 batch to ABC008 batch ,
CDE 009 to CDE010, XYZ012, PQR013 batch.
this batch number contains characters and numeric.
i want to print like this
delivery___item__frombatch__to batch____shade__noofcones__netwt___grosswt____no of bags
100______10____ABC001____ABC008___black__40_________50 kg__50.4 kg_____8
_______________CDE009____CDE010___black__50_________50 kg__50.4 kg_____2
_______________XYZ012_____XYZ012___black__50_________50 kg__50.4 kg_____1
_______________PQR013____PQR013___black__40_________50 kg__50.4 kg_____1
can u any please help me how to build the logic.Hello Navin,
You've got to give control break points within the loop, to fix the problem.
LOOP AT T_TABLE INTO FS_TABLE.
AT NEW FIELDNAME1.
WRITE:/ FS_TABLE-FIELDNAME1.
ENDAT. " AT NEW FIELDNAME1
AT NEW FIELDNAME2.
WRITE:/ FS_TABLE-FIELDNAME2.
ENDAT. " AT NEW FIELDNAME2
* Fieldname3 will be printed below distinct Fieldname2. Fieldname3 is printed as bunch.
WRITE:/ FS_TABLE-FIELDNAME3.
ENDLOOP. " LOOP AT T_TABLE INTO FS_TABLE
Note:
Try giving ON CHANGE OF T_TABLE-FIELDNAME.
This is an obsolete statement, but this really does well, in case of printing Currency or Date.
Usually, date and currency fields are printed
Rs.****.**
LOOP AT T_TABLE INTO FS_TABLE.
ON CHANGE OF FS_TABLE-FIELDNAME1.
WRITE:/ FS_TABLE-FIELDNAME1.
ENDON. " ON CHANGE OF FS_TABLE-FIELDNAME1
ON CHANGE OF FS_TABLE-FIELDNAME2.
WRITE:/ FS_TABLE-FIELDNAME2.
ENDON. " ON CHANGE OF FS_TABLE-FIELDNAME2
WRITE:/ FS_TABLE-FIELDNAME3.
ENDLOOP. " LOOP AT T_TABLE INTO FS_TABLE
Try with the concept above, hope you'll get the solution.
Thankyou,
Zahackson -
Hi iam trying to get the po line item latest changedby name to display in my report
can you give me the logic to get the changed by name for theline item.
i have written the code but if i change the line item 20 then in the out put the changedby name is being displayed for line itema 10 ,20, 30 i e for all line items .but i want the changeby name to be displayed only for the particular line item which was changed.
*& Report ZMR_PO_AUDIT_RPT *
*& Purpose - Report on PO release details for auditing. *
Program ID : ZMR_PO_AUDIT_RPT *
Title : Purchase Release Audit Report *
Create Date : 19.03.2007 *
Author : Marina Gosman (JH IT services) *
Tech. Spec : *
Change Req #: *
Changed by | Description of change | Date *
MarinaG | Change the report Heading to Purchase | *
| Order Action Audit Report R3DK912376 |23.03.07 *
MarinaG | Fix a select bug. R3DK912384 |23.03.07 *
MarinaG | Change report heading by removing fields |27.03.07 *
| R3DK912404 | *
MarinaG | Add exception checkbox which will only |3.04.07 *
| show the same GR, Released and Created | *
| username R3DK912444. | *
MarinaG | Add GR Value and Vendor Name FP#1919 |28.08.07 *
| R3DK912809 | *
MarinaG | Add line item no., display line items for |11.10.07 *
| GR period and GR date FP#1919 R3DK912960 | *
REPORT ZSAMPLE3 NO STANDARD PAGE HEADING LINE-SIZE 200
MESSAGE-ID zv.
Database Tables
TABLES: ekko,t16fd,cdhdr,cdpos,t000,lfa1,t024,ekbe,mkpf.
TYPE-POOLS slis.
Type Declaration
*TYPE-POOLS: kkblo.
Structures
DATA:BEGIN OF st_output,
ebeln LIKE ekko-ebeln,
batxt LIKE t161t-batxt,
banfn LIKE eban-banfn,
bukrs LIKE ekko-bukrs,
frggr LIKE ekko-frggr,
frgsx LIKE ekko-frgsx,
frgct LIKE t16fd-frgct,
udate LIKE cdhdr-udate,
utime like cdhdr-utime,
username LIKE cdhdr-username,
lifnr LIKE ekko-lifnr, " vendor
name1 LIKE lfa1-name1, " vendor name
ebelp LIKE ekpo-ebelp, " line no.
afnam LIKE ekpo-afnam, " requisitioner
netwr LIKE ekpo-netwr,
ekgrp LIKE ekko-ekgrp,
eknam LIKE t024-eknam,
ernam LIKE ekko-ernam,
grnam LIKE ekbe-ernam,
bedat LIKE ekko-bedat,
budat LIKE ekbe-budat,
belnr LIKE ekbe-belnr, "R3DK912960
dmbtr LIKE ekbe-dmbtr, "R3DK912960
Indira
cdate LIKE cdhdr-username,
Indira
END OF st_output.
Indra
DATA: l_ponum LIKE ekko-ebeln,
l_poline LIKE ekpo-ebelp.
DATA: BEGIN OF t_EKbe OCCURS 0,
ebeln LIKE EKbe-ebeln,
belnr LIKE EKbe-Belnr,
budat LIKE EKbe-Budat,
cputm LIKE EKbe-cputm,
END OF T_EKbe.
DATA: BEGIN OF T_mkpf OCCURS 0,
mblnr LIKE mkpf-mblnr,
usnam LIKE mkpf-usnam,
END OF T_mkpf.
Internal Tables
DATA: t_cdhdr LIKE cdhdr OCCURS 0 WITH HEADER LINE,
t_cdhdr1 LIKE cdhdr OCCURS 0 WITH HEADER LINE,
po_ekko LIKE ekko OCCURS 0 WITH HEADER LINE.
Indra
DATA: t_cdpos LIKE cdpos OCCURS 0 WITH HEADER LINE.
indra
DATA: BEGIN OF tbl_output OCCURS 0.
INCLUDE STRUCTURE st_output.
DATA: END OF tbl_output.
DATA: BEGIN OF tbl_ekpo OCCURS 0.
INCLUDE STRUCTURE ekpo.
DATA: END OF tbl_ekpo.
DATA: BEGIN OF tbl_ekbe OCCURS 0.
INCLUDE STRUCTURE ekbe.
DATA: END OF tbl_ekbe.
DATA: BEGIN OF t_ekko OCCURS 0,
ebeln TYPE ebeln,
ebelp TYPE ebelp, "R3DK912960
belnr TYPE MBLNR, "R3DK912960
bukrs TYPE bukrs,
bsart TYPE bsart,
bedat TYPE bedat,
budat TYPE budat,
ernam TYPE ernam,
grnam TYPE ernam,
dmbtr TYPE dmbtr, "R3DK912960
END OF t_ekko.
DATA: c_tcode(25) TYPE c.
DATA: st_fieldcat TYPE slis_fieldcat_alv.
DATA: tbl_fieldcat TYPE slis_t_fieldcat_alv.
DATA: st_event TYPE slis_alv_event.
DATA: tbl_events TYPE slis_t_event.
DATA: fieldname(30) TYPE c.
DATA: st_layout TYPE slis_layout_alv.
DATA: g_status TYPE slis_formname VALUE 'STANDARD01'.
DATA: g_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
DATA: st_status TYPE slis_status.
DATA: tbl_status TYPE slis_status OCCURS 0 WITH HEADER LINE.
DATA: f_ebeln LIKE ekko-ebeln.
DATA: cursorfield LIKE ekko-ebeln.
DATA: ws_ebeln LIKE ekko-ebeln,
ws_netwr LIKE ekpo-netwr,
ws_ernam LIKE ekbe-ernam,
rs_selfield TYPE slis_selfield,
ws_dmbtr LIKE ekbe-dmbtr. "R3DK912809
RANGES: r_kunnr FOR vbak-kunnr OCCURS 0.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK title WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_bukrs FOR ekko-bukrs OBLIGATORY,
s_ekorg FOR ekko-ekorg OBLIGATORY,
s_ebeln FOR ekko-ebeln,
s_groups FOR ekko-ekgrp,
s_lifnr FOR ekko-lifnr,
s_bedat FOR ekko-bedat,
s_budat FOR ekbe-budat,
s_bsart FOR ekko-bsart.
SELECTION-SCREEN END OF BLOCK title .
SELECTION-SCREEN BEGIN OF BLOCK title2 WITH FRAME TITLE text-001.
PARAMETERS: p_gr AS CHECKBOX DEFAULT 'X',
p_excep AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK title2 .
*& AT SELECTION SCREEN
AT SELECTION-SCREEN.
IF NOT p_gr IS INITIAL.
IF s_budat IS INITIAL.
MESSAGE s000 WITH 'Please enter Goods Receipt Date.'.
STOP.
ENDIF.
ELSE.
IF s_bedat IS INITIAL.
MESSAGE s000 WITH 'Please enter Purch Doc Date.'.
STOP.
ENDIF.
ENDIF.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM select_data. " Select data
PERFORM sort_table.
PERFORM get_events. " Include header in display
PERFORM get_eventstatus. " Set the GUI status
PERFORM get_layout. " Define ALV Layout
PERFORM get_fieldcat. " Fill report fields
PERFORM create_report. " Write ALV format
AT LINE-SELECTION.
PERFORM user_command USING sy-ucomm
rs_selfield.
FORM user_command *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: l_ta TYPE sy-tcode VALUE 'SLIS_DUMMY'.
CLEAR: f_ebeln.
CASE r_ucomm.
WHEN 'CF1'.
READ TABLE tbl_output INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
f_ebeln = tbl_output-ebeln.
ENDIF.
SET PARAMETER ID 'BES' FIELD f_ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
Begin of R3DK912404
WHEN 'EXIT' OR 'CANC'.
LEAVE PROGRAM.
End of R3DK912404
WHEN 'OTHERS'.
ENDCASE.
ENDFORM. "user_command
FORM STANDARD_02 *
--> EXTAB *
FORM standard_01 USING extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD01' EXCLUDING extab .
ENDFORM. "standard_01
*& Form get_events
setup report headings
--> p1 text
<-- p2 text
FORM get_events.
CLEAR st_event.
st_event-name = 'TOP_OF_PAGE'.
st_event-form = 'PROCESS_TOP_OF_PAGE'.
APPEND st_event TO tbl_events.
ENDFORM. " get_events
FORM get_eventstatus *
FORM get_eventstatus.
CLEAR st_status.
st_status-callback_pf_status_set = 'STANDARD_01'.
APPEND st_status TO tbl_status.
ENDFORM. " get_eventstatus
*& Form get_layout
text
--> p1 text
<-- p2 text
FORM get_layout.
CLEAR st_layout.
st_layout-zebra = 'X'.
ENDFORM. " get_layout
*& Form get_fieldcat
text
--> p1 text
<-- p2 text
FORM get_fieldcat.
PERFORM write_fieldcat USING 'EBELN' 'TBL_OUTPUT' 'EKKO' 'X' 1 ' '.
PERFORM write_fieldcat USING 'BUKRS' 'TBL_OUTPUT' 'EKKO' 'X' 2 ' '.
Begin of R3DK912960
PERFORM write_fieldcat USING 'EBELP' 'TBL_OUTPUT' 'EKPO' 'X' 3 ' '.
End of R3DK912960
PERFORM write_fieldcat USING 'UDATE' 'TBL_OUTPUT' ' ' ' ' 4
'Doc. Date'.
PERFORM write_fieldcat USING 'UTIME' 'TBL_OUTPUT' ' ' ' ' 13
'Doc. Time'.
Begin of R3DK912960
PERFORM write_fieldcat USING 'BUDAT' 'TBL_OUTPUT' ' ' ' ' 5
'GR Date'.
End of R3DK912960
PERFORM write_fieldcat USING 'ERNAM' 'TBL_OUTPUT' ' ' ' ' 6
'Created By'.
PERFORM write_fieldcat USING 'USERNAME' 'TBL_OUTPUT' ' ' ' ' 7
'Released By'.
PERFORM write_fieldcat USING 'GRNAM' 'TBL_OUTPUT' ' ' ' ' 8
'Goods Receipted By'.
PERFORM write_fieldcat USING 'CDATE' 'TBL_OUTPUT' ' ' ' ' 9
'Changed By'.
PERFORM write_fieldcat USING 'NETWR' 'TBL_OUTPUT' ' ' ' ' 10
'Total Value'.
PERFORM write_fieldcat USING 'EKGRP' 'TBL_OUTPUT' 'EKKO' ' ' 11 ' '.
Begin of R3DK912809
PERFORM write_fieldcat USING 'DMBTR' 'TBL_OUTPUT' ' ' ' ' 12
'GR Value '.
PERFORM write_fieldcat USING 'NAME1' 'TBL_OUTPUT' ' ' ' ' 13
'Vendor Name'.
End of R3DK912809
ENDFORM. " get_fieldcat
FORM process_top_of_page *
FORM process_top_of_page.
SKIP.
ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED OFF .
Begin of R3DK912376
WRITE:/ 'Report Name : PO Release Audit Report',
WRITE:/ 'Report Name : Purchase Order Actions Report',
End of R3DK912376
/ 'Run Date : ', sy-datum,
/ 'Run Time : ', sy-uzeit,
Begin of R3DK912404
/ 'Document Type : ', c_tcode,
End of R3DK912404
/ 'Company code : ', s_bukrs-low.
IF NOT s_bukrs-high IS INITIAL.
WRITE: 'To', s_bukrs-high.
ENDIF.
WRITE:/ 'Purch Org : ', s_ekorg-low.
IF NOT s_ekorg-high IS INITIAL.
WRITE: 'To', s_ekorg-high.
ENDIF.
Begin of R3DK912404
WRITE:/ 'Purchase Order : ', s_ebeln-low.
IF NOT s_ebeln-high IS INITIAL.
WRITE: 'To', s_ebeln-high.
ENDIF.
WRITE:/ 'Purchasing Grp : ', s_groups-low.
IF NOT s_groups-high IS INITIAL.
WRITE: 'To', s_groups-high.
ENDIF.
WRITE:/ 'Vendor : ', s_lifnr-low.
IF NOT s_lifnr-high IS INITIAL.
WRITE: 'To', s_lifnr-high.
ENDIF.
WRITE:/ 'Goods Receipt Date:', s_budat-low.
IF NOT s_budat-high IS INITIAL.
WRITE: 'To', s_budat-high.
ENDIF.
End of R3DK912404
WRITE:/ 'Purch Doc Date : ', s_bedat-low.
IF NOT s_bedat-high IS INITIAL.
WRITE: 'To', s_bedat-high.
ENDIF.
Begin of R3DK912404
WRITE:/ 'Purch Doc Type : ', s_bsart-low.
IF NOT s_bsart-high IS INITIAL.
WRITE: 'To', s_bsart-high.
ENDIF.
End of R3DK912404
ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED OFF.
ENDFORM. " process_top_of_page
*& Form create_report
text
--> p1 text
<-- p2 text
FORM create_report.
SORT tbl_output BY ebeln ebelp.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_events = tbl_events
i_interface_check = ' '
i_callback_program = 'ZSAMPLE3'
i_callback_pf_status_set = g_status
i_callback_user_command = g_user_command
is_layout = st_layout
it_fieldcat = tbl_fieldcat
i_default = 'X'
i_save = 'X'
TABLES
t_outtab = tbl_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " create_report
*& Form select_data
select records for specified selections
--> p1 text
<-- p2 text
FORM select_data.
CLEAR: c_tcode, t_cdhdr, t_ekko, tbl_output.
REFRESH: t_cdhdr, t_ekko, tbl_output, tbl_fieldcat.
IF NOT p_gr IS INITIAL.
SELECT DISTINCT a~ebeln "R3DK912960
SELECT a~ebeln "R3DK912960
b~ebelp "R3DK912960
b~belnr
a~bukrs
a~bsart
a~bedat
b~budat
a~ernam
b~ernam
INTO TABLE t_ekko
FROM ekko AS a
INNER JOIN ekbe AS b
ON aebeln = bebeln
Begin of R3DK912384
AND b~bewtp = 'E'
AND b~bwart = '101'
End of R3DK912384
WHERE a~bukrs IN s_bukrs AND
a~ebeln IN s_ebeln AND
a~ekgrp IN s_groups AND
a~lifnr IN s_lifnr AND
a~bsart IN s_bsart AND
a~ekorg IN s_ekorg and
a~bedat IN s_bedat AND
b~budat IN s_budat AND
a~frgke = 'R'
ORDER BY aebeln bbudat DESCENDING.
Begin of R3DK912809 R3DK912960
DELETE ADJACENT DUPLICATES FROM T_EKKO COMPARING EBELN.
End of R3DK912809 R3DK912960
ELSE.
SELECT DISTINCT a~ebeln "R3DK912960
SELECT a~ebeln "R3DK912960
b~ebelp "R3DK912960
b~belnr
a~bukrs
a~bsart
a~bedat
b~budat
a~ernam
b~ernam
INTO TABLE t_ekko
FROM ekko AS a
LEFT JOIN ekbe AS b
ON aebeln = bebeln
Begin of R3DK912384
AND b~bewtp = 'E'
AND b~bwart = '101'
End of R3DK912384
WHERE a~bukrs IN s_bukrs AND
a~ebeln IN s_ebeln AND
a~ekgrp IN s_groups AND
a~lifnr IN s_lifnr AND
a~bsart IN s_bsart AND
a~ekorg IN s_ekorg AND
a~bedat IN s_bedat AND
a~frgke = 'R'
ORDER BY aebeln bbudat DESCENDING.
Begin of R3DK912809 R3DK912960
DELETE ADJACENT DUPLICATES FROM T_EKKO COMPARING EBELN.
End of R3DK912809 R3DK912960
ENDIF.
sort t_ekko by ebeln ebelp budat descending.
sivanew
delete adjacent duplicates from t_ekko comparing ebeln ebelp .
sivanew
IF sy-subrc EQ 0. "R3DK912809
IF NOT t_ekko[] IS INITIAL. "R3DK912809
PERFORM process_data.
Begin of R3DK912444
IF NOT p_excep IS INITIAL.
PERFORM get_exceptions.
ENDIF.
End of R3DK912444
ENDIF.
ENDFORM. " select_data
*& Form write_fieldcat
text
-->P_0190 field name, if the SAP name used desc will be
automatically get from SAP table
-->P_0191 Internale structure or table name
-->P_0192 SAP table for field description
-->P_0193 format
-->P_1 Position
-->P_0195 Custom Description
FORM write_fieldcat USING name tab st key pos desc.
st_fieldcat-fieldname = name.
st_fieldcat-tabname = tab.
st_fieldcat-ref_tabname = st.
st_fieldcat-key = key.
st_fieldcat-col_pos = pos.
st_fieldcat-seltext_m = desc.
IF pos = 12.
st_fieldcat-outputlen = 40.
ENDIF.
APPEND st_fieldcat TO tbl_fieldcat.
CLEAR st_fieldcat.
ENDFORM. " write_fieldcat
*& Form process_record
text
--> p1 text
<-- p2 text
FORM process_record.
DATA:l_ebeln LIKE ekko-ebeln.
LOOP AT t_cdhdr.
CLEAR: l_ebeln, ws_ebeln, ws_netwr, ws_ernam.
MOVE t_cdhdr-objectid TO l_ebeln.
CALL FUNCTION 'ME_EKKO_SINGLE_READ'
EXPORTING
pi_ebeln = l_ebeln
IMPORTING
po_ekko = po_ekko.
Begin of R3DK912809 R3DK912960
SELECT SUM( dmbtr ) INTO ws_dmbtr
FROM ekbe WHERE ebeln = l_ebeln
AND vgabe = '1'
AND bewtp = 'E'
GROUP BY ebeln.
ENDSELECT.
End of R3DK912809
SELECT SINGLE dmbtr INTO t_ekko-dmbtr
FROM ekbe WHERE ebeln = t_ekko-ebeln
AND ebelp = t_ekko-ebelp
AND belnr = t_ekko-belnr
AND vgabe = '1'
AND bewtp = 'E'.
MODIFY T_EKKO.
End of R3DK912960
SELECT SINGLE ernam INTO t_ekko-grnam
FROM ekbe WHERE ebeln = t_ekko-ebeln
AND ebelp = t_ekko-ebelp
AND ELIKZ = 'X'.
MODIFY T_EKKO.
SELECT ebeln SUM( netwr ) INTO (ws_ebeln, ws_netwr)
FROM ekpo WHERE ebeln = l_ebeln R3DK912960
FROM ekpo WHERE ebeln = t_ekko-ebeln "R3DK912960
GROUP by ebeln.
ENDSELECT.
IF sy-subrc EQ 0.
IF s_groups IS INITIAL.
PERFORM build_output.
ELSE.
IF po_ekko-ekgrp IN s_groups.
PERFORM build_output.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " process_record
*& Form get_customer
Get Customers if sales office specified
--> p1 text
<-- p2 text
*& Form build_output
text
--> p1 text
<-- p2 text
FORM build_output.
DATA: l_line LIKE ekpo-ebelp.
DATA: l_requisitioner LIKE ekpo-afnam.
IF po_ekko-frgke = 'R'.
CLEAR: tbl_output.
tbl_output-udate = t_cdhdr-udate.
tbl_output-utime = t_cdhdr-utime.
tbl_output-username = t_cdhdr-username.
tbl_output-ebeln = po_ekko-ebeln.
tbl_output-bukrs = po_ekko-bukrs.
tbl_output-lifnr = po_ekko-lifnr.
tbl_output-name1 = ' '.
tbl_output-lifnr = po_ekko-lifnr.
tbl_output-ekgrp = po_ekko-ekgrp.
tbl_output-ernam = po_ekko-ernam.
tbl_output-ernam = t_ekko-ernam.
tbl_output-budat = t_ekko-budat.
tbl_output-grnam = t_ekko-grnam.
tbl_output-bedat = t_ekko-bedat.
tbl_output-dmbtr = t_ekko-dmbtr. "R3DK912809
tbl_output-ebelp = t_ekko-ebelp.
SORT T_CDHDR1.
sivanew
read table t_cdhdr1 with key
objectid = t_cdhdr-objectid binary search.
if sy-subrc = 0.
tbl_output-cdate = t_cdhdr1-username.
endif.
read table t_cdhdr1 with key
tcode = 'ME22N' binary search.
if sy-subrc = 0.
SELECT * FROM cdpos INTO TABLE t_cdpos
WHERE objectid = t_cdhdr1-objectid AND
objectclas = 'EINKBELEG' AND
changenr = t_cdhdr1-changenr.
IF sy-subrc = 0.
l_ponum = t_cdpos-tabkey+3(10).
l_poline = t_cdpos-tabkey+13(6).
ENDIF.
ENDIF.
IF tbl_output-ebeln = l_ponum AND tbl_output-ebelp = l_poline.
READ TABLE t_cdhdr1 WITH KEY changenr = t_cdpos-changenr
tcode = 'ME22N' BINARY SEARCH.
IF sy-subrc = 0.
tbl_output-cdate = t_cdhdr1-username.
ENDIF.
ENDIF.
ENDIF.
select ebeln belnr budat cputm from ekbe into table t_ekbe
where vgabe = '1' and
ebeln = t_cdhdr-objectid.
sort t_ekbe by budat descending cputm descending.
delete adjacent duplicates from t_ekbe comparing ebeln.
loop at t_ekbe.
select mblnr usnam from mkpf into table t_mkpf
where mblnr = t_ekbe-belnr.
if sy-subrc = 0.
read table t_mkpf with key
mblnr = t_ekbe-belnr binary search.
move t_mkpf-usnam to tbl_output-grnam.
endif.
endloop.
Indra
Get the user changed the record
IF t_cdhdr-tcode = 'ME22N'.
SELECT * FROM cdpos INTO TABLE t_cdpos
WHERE objectid = t_cdhdr-objectid AND
objectclas = 'EINKBELEG' AND
changenr = t_cdhdr-changenr.
IF sy-subrc = 0.
l_ponum = t_cdpos-tabkey+3(10).
l_poline = t_cdpos-tabkey+13(6).
ENDIF.
ENDIF.
indra
Display creator or changer
IF tbl_output-ebeln = l_ponum AND tbl_output-ebelp = l_poline.
READ TABLE t_cdhdr WITH KEY changenr = t_cdpos-changenr
tcode = 'ME22N' BINARY SEARCH.
IF sy-subrc = 0.
tbl_output-cdate = t_cdhdr-username.
ENDIF.
ENDIF.
Indra
SELECT SINGLE * FROM t024
WHERE ekgrp = po_ekko-ekgrp.
IF sy-subrc EQ 0.
tbl_output-eknam = t024-eknam.
ENDIF.
tbl_output-netwr = ws_netwr.
SELECT SINGLE name1 FROM lfa1
INTO tbl_output-name1
WHERE lifnr = po_ekko-lifnr.
Get Document descriptions
SELECT SINGLE batxt FROM t161t
INTO tbl_output-batxt
WHERE spras = 'E' AND
bsart = po_ekko-bsart AND
bstyp = po_ekko-bstyp.
Get Release code descriptions
SELECT SINGLE frgct FROM t16fd
INTO tbl_output-frgct
WHERE spras = 'E' AND
frggr = po_ekko-frggr AND
frgco = po_ekko-frgsx.
APPEND tbl_output.
ENDIF.
ENDFORM. " build_output
*& Form SORT_TABLE
text
--> p1 text
<-- p2 text
FORM sort_table.
SORT tbl_output BY ebeln ebelp ascending udate utime DESCENDING.
SORT tbl_output BY ebeln ascending udate utime DESCENDING.
delete adjacent duplicates from tbl_output comparing ebeln ebelp .
ENDFORM. " SORT_TABLE
*& Form PROCESS_DATA
text
--> p1 text
<-- p2 text
FORM process_data.
LOOP AT t_ekko.
c_tcode = 'Purchase Orders'.
SELECT * FROM cdhdr UP TO 1 ROWS INTO TABLE t_cdhdr "R3DK912960
SELECT * FROM cdhdr into table t_cdhdr
WHERE objectclas = 'EINKBELEG' AND
objectid = t_ekko-ebeln AND
tcode = 'ME28'.
SORT T_CDHDR BY UDATE DESCENDING UTIME DESCENDING.
delete adjacent duplicates from t_cdhdr comparing objectid.
siva
SELECT * FROM cdhdr UP TO 1 ROWS INTO TABLE t_cdhdr1
*"R3DK912960
SELECT * FROM cdhdr INTO TABLE t_cdhdr1
WHERE objectclas = 'EINKBELEG' AND
objectid = t_ekko-ebeln AND
tcode = 'ME22N'.
SORT T_CDHDR1 BY UDATE descending UTIME DESCENDING.
delete adjacent duplicates from t_cdhdr1 comparing objectid.
sivanew
if c_tcode = 'ME22N'.
SELECT * FROM cdpos INTO TABLE t_cdpos
WHERE objectid = t_cdhdr1-objectid AND
objectclas = 'EINKBELEG' AND
changenr = t_cdhdr1-changenr.
IF sy-subrc = 0.
l_ponum = t_cdpos-tabkey+3(10).
l_poline = t_cdpos-tabkey+13(6).
ENDIF.
ENDIF.
*sivanew
IF sy-subrc = 0.
delete adjacent duplicates from t_cdhdr comparing objectid.
PERFORM process_record. " process each document
ENDIF.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form get_exceptions
text
--> p1 text
<-- p2 text
form get_exceptions.
Display a report which shows the same released, goods receipted and
created by user
LOOP AT tbl_output.
IF tbl_output-username <> tbl_output-ernam OR
tbl_output-ernam <> tbl_output-grnam.
DELETE tbl_output.
ENDIF.
ENDLOOP.
endform. " get_exceptionsHi,
first of all you should read the following thread ABAP Development It is really hard to read code without proper formatting.
It looks like you use change documents to get user name for last change. For each document you use last change document and hence you have same name for every item. I am not sure if it is possible (it should be) but for each item you need to look for last change document corresponding to this item.
Cheers -
Hi folks,
Actually my requirement is, i have some data in an internal table. I have to check the particular record in in that itab is there in infotype 9003 by checking some condtions. if the record is not found in the 9003 i need to display a error message. I am new to ABAP HR. Please help me regarding the logic of comparing ITAB and an infotype in my requirement here.
Thanks,
Ram.Create a program
In program attributes
Put PNP for the Logical Database field
Save it
You will have PNP's standard selection screen
If you dont want selection screen from PNP,
In program attributes Choose HR REPORT CATEGORY
Create one with no fields for selection
tables: pernr
infotypes: 0000, 0001, 0002, 0006, 9003
start-of-selection.
get pernr.
loop at table p9003.
endloop.
all values of 9003 will be in internal table p9003
If you have Personnel number in your internal table itab then the easier code without PNP Logical database is
loop at itab.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
* TCLAS = 'A'
pernr = itab-pernr
infty = 9003
BEGDA = '18000101'
ENDDA = '99991231'
IMPORTING
SUBRC = subrc
tables
infty_tab = it9003
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc = 0.
** Do the processing you want to do
ENDIF.
endloop.
Reward points if helpful -
Help in writing logic to abaper for printing contact details from partnr fn
Hi friends,
I have to give the logic to the abaper to print the contact details of one partner which is manually entered in the quotation at header level.
i have a partner z1 with partner type PE which is manually entered in the partner fn field at the header level. this z1 partner fn is an employee. The name and contact details of this employee needs to be printed in the header of the output.
What is the logic i need to give to abaper for this.
Regards,
AnandHi Anand,
In case you do not find an ADRNR for the respective partner funtion in VBPA table, then, it means that the employee number derived from customer master is correct. Then, I think you can take KUNNR number for the employee partner function thro' VBPA and put the same in KNA1 table to get the right ADRNR. (As explained by me in the first post).
My question now is, are you maintaining the employee in XD01 (customer) or in VPE1 (Sales Rep)?
You can try with tables PA0002 Personal Data and PA0006 Addresses only if you maintain employees thro' VPE1 Tcode. PA0006 has PERNR field. But, what you have to make sure is that the table is getting updated. Else, you may not find the data here as well.
Hope this helps...
Thanks
Mukund S
Maybe you are looking for
-
Bypassing integration engine in pi 7.0
Hi Am supposed to work on bypassing the integration engine in case of file to Jdbc. Am working on version pi 7.0. How can I bypass integration engine ?
-
Can't run form from Form Builder 10g - Port configuration problem?
Hi, I have installed the Database (10.2.0.1.0) and the Developer Suite (10.1.2.0.2) on two Linux machines (Red Hat Enterprise Linux ES 4 Basic). If I enter the frmservlet-URL manually everything seems to be fine. In one case I enter http://127.0.0.1:
-
Oracle Connection - java.lang.ClassCastException
Hi there, I am trying to connect to Oeacle database from Java application( Webdynpro from SAP). I have created a datasource in J2EE Engine, and trying to connect with ffolowing code: InitialContext ctx = new InitialContext(); DataSource ds = (DataSou
-
Identifying rings and edges with problems
Hi I have new polygon layers that produce a validation error for a polygon of gtype of 2007: 13350 [Element <1>] [Rings 1, 8][Edge <9> in ring <1>][Edge <33> in ring <8>] The error is: ORA-13350: two or more rings of a complex polygon touch Cause: Th
-
The icons are not working on my Palm Z 22. I have performed both a soft reset and hard reset to no avail. What next?