Getting delivered Quantity using ABAP Program
Dear All,
How can I get the delivered quantity against a sales order document (Orders in VA03).?
Which tables are involved.? How can I join the tables.?
Regards,
Aneel
Aneel,
You should take the sales order number and item number and find the corresponding lite item in the delivery. The field LFIMG in LIPS will tell you the quantity that is delivered.
For sales order, you can use VBAK/VBAP
For Delivery you can use LIKP/LIPS.
Thanks,
Vikram.M
Similar Messages
-
Synchronizing Two Custom Z Tables Using Abap Program
Hi,
My requirement is Synchronizing two custom z tables using abap program me.
I have vendors in two tables, i have to select the common vendors from first which are existing in second table also.
In first table each vendor can have more than one supplier types in one field only. In second table these supplier types are divided into
different fields.
My requirement is I have to check supplier types in first table and i have to pass X to corresponding supplier types in second table vendor.
I have to pass X value for each depending in Second table depending upon supplier type in first table.
. How to do it can any one suggest with code.
Thanks in Advance,
Vivek
<subject edited by moderator>
Message was edited by: Manish KumarHi,
Imho, you need to get (meaning, extract into separate fields) the different supplier types from Table1 first. Your key for Table1 is the vendor no, which is also the key in Table2 (or the key for Table2 is Vendor no & Type).
For better performance, better select multiple/all required entries from Table1 instead of doing a select endselect.
Depending on the format of the vendortypes in Table1, put them in a new itab (for our purpose named Table1New where vendor no & type are the only 2 fields. For example, if the type length is fixed to 2 chars, or divided by space,... use your coding accordingly.
Next step is to select all vendor no's in Table2 which you have selected in Table1. If in Table2, the vendor no is the only key (and the all vendor types are filled in a single record), then loop check the vendor types from Table1New against the types in Table2.
If the key of Table2 is vendor no & vendor type, then do a read table for the key.
The logic in pseudo-code:
Select from Table1 into table. If you'd like to limit the selection size, add package size statement.
extract the vendor types in to itab Table1New.
Select the vendor & types from Table2 by using the for all entries option (better performance).
loop at Table1New
check in Table2:
if the unique key is vendor no: check all fields for the vendor type from Table1New
if the unique key combo is vendor no & type: check by using a read table.
If not found => add entry to Table2
endloop.
endselect Table1 (when using package size)
I guess the most difficult step is to extract the types from Table1 into separate fields, all the rest seems straight forward. Please keep in mind the itab type definitions for a better performance.
Good luck!
Best regards,
Zhou -
Access table using ABAP program in other database
Dear SAP Expert,
We have requirement that related to SAP interface.
Our SAP system run on Oracle database 11g (Unix).
Illustration: SAP system = A non SAP system = B
We need to access a table using ABAP program (from SAP system A) in other database (system B) that are not necessarily SAP database. The non-SAP system using SQL Server 2008 (Windows).
What is the best practice for this interface
Do we need database link? If yes, please help to inform me the details step to configure it.
Thanks and RegardsHi Friend,
You try using an intermediate system..passing your input required to fetch the data..and PI should call the respective query to retrive record..once the full flow is completed you should get the return through some table in the calling program.
else.
ask the other system guy to write a function with select query and ask him to expose as RFC and that RFC we have to call it as RFC in our program to get the required values and only thing we need here is a proper connector in place.
Regards
S.Janagar -
Is it possible to reset password for any user using abap program
Hi friends,
Is it possible to reset password for any user using abap program by specifying client number and user id. in selection screen.
if any code for that to reset password please mail me.
Thanks & Regards,
YogeshHello Yogesh,
Yes you can reset the password for any body using ABAP Code. But for that you really don't need any client number.
If this process is on regular basis, then recommended is to use BAPI for changing the user details Otherwise BDC also works fine.
=> Function Module - BAPI_USER_CHANGE
Call this in the program for resetting the password.
=> CALL TRANSACTION 'SU01' USING InternalTable
This will be executed in the BDC of SU01 transaction recording. Use the Password Change button in the application toolbar of transaction while recording.
Hope this helps.
PS If the answer solves your query, plz close the thread by marking it solved and rewarding each reply.
Regards -
Fork in process chain using ABAP program
Hello everyone.
I need a fork in my chain. Depending on the values in some db table I will make a decision: do some process or skip and go further. The only solution I can see is using ABAP program. But unfortunately It doesn't return status. Any suggestion will be appreciated.Hi,
You have few process to run after the abap program. So make all those process as a different chain, and at the end of the ABAP program include a function module to trigger this chain, based on your condition.
If you like this idea, please revert for more information.
Hope this helps.
Thank you, -
Unzip files using ABAP program
Hi All,
Can anybody guide me how to Unzip a .zip file using ABAP program... Appreciate your immediate reply...
actually, my scenario is to check whether zip file is created in appl.server or not.., and if zip file created then i need to check whether its blank file or any content exist inside the file...
Thanks in advance
Bhaskerhi
good
parameters: command(236) lower case.
data: std_lines(255) occurs 0 with header line.
call function 'RFC_REMOTE_PIPE'
destination 'SERVER_EXEC'
exporting
command = command
read = 'X'
tables
pipedata = std_lines
exceptions
communication_failure = 1
system_failure = 2.
You should put your Unix command in the command parameter. "gunzip /yourfilepath/yourfilename" works on my Unix system. Once you determine the proper Unix command, you should be set. This technique is also nice because it provides you with echos back from Unix in table std_lines. For more complex Unix activity, you may want to consider throwing together a Unix script, and calling that via this code.
reward point if helpful.
thanks
mrutyun^ -
How to print external file using ABAP program
Hello
I want to print an external file which is located in server (
20.99.0.18\GUI\xyz\8.0QUALITY\QM_TS.DOC) .....i want to print these kind of files(which i have retrieved from table 'DRAW' field 'filep' )......i need to print these files using ABAP program.
thank you
Vikram.
Message was edited by:
Vikram Bojjaextract the data and pass to script or smartform for printing
-
Can a transaction be called in background dynamically using ABAP program??
Hi Experts,
Can a transaction be called in background dynamically using ABAP program without BDC???
Regards,
Mansi.u can create job dynamically through programming..Try this sample code..
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
Insert process into job
SUBMIT zreport and return << Here it is a static call but u can make it dynamic
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
Regards,
JOy. -
HOW TO creat BAR CHART using ABAP Programming
DEAR ALL,
I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
Regards,
VJOn earlier versions, you can do something like this.
[code]
REPORT ZRICH_0005 .
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA.
Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Maple'.
ITAB_DATA-QUANTITY1 = 5500.
ITAB_DATA-QUANTITY2 = 6200.
ITAB_DATA-QUANTITY3 = 5900.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Oak'.
ITAB_DATA-QUANTITY1 = 3500.
ITAB_DATA-QUANTITY2 = 5200.
ITAB_DATA-QUANTITY3 = 4400.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Cherry'.
ITAB_DATA-QUANTITY1 = 1800.
ITAB_DATA-QUANTITY2 = 2200.
ITAB_DATA-QUANTITY3 = 1900.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Lumber Usage in $'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
[/code]
Regards,
Rich Heilman -
Name the infotypes we uplode using abap programs
Hi,
can anyboby let me know, Name the infotypes we uplode using abap programs?
ThanksIT0008
IT0045
IT0589 ETC
some of them can be made through LSMW also but we use BDC . the main reason is we wont find Feilds to upload those data in templates -
How do i get Delivered quantity in sales units
Hi all,
How do i get Delivered quantity in sales units, in schedule lines (SD - VA02).
I tried RV_SCHEDULE_CHECK_DELIVERIES, it not works.I m unable to find any table.
Please suggest ...
regards,
prasad gorehi,
try this.
* Fill Pending and Delivered Quantity *
SELECT *
from vbup
into table it_vbup
where vbeln = it_vbap-vbeln
and posnr = it_vbap-POSNR.
READ TABLE IT_VBUP WITH KEY VBELN = IT_VBAP-VBELN POSNR = IT_VBAP-POSNR.
IF SY-SUBRC EQ 0.
IT_FINAL-lv_status = IT_VBUP-LFSTA.
ENDIF.
SELECT *
from vbfa
into table it_vbfa
where VBELV = it_vbap-vbeln
and POSNV = it_vbap-posnr.
loop at it_vbap into wa_vbap where vbeln = it_vbak-vbeln.
MOVE-CORRESPONDING wa_vbap to it_VBAPVB.
append it_VBAPVB.
endloop.
loop at it_vbEp where vbeln = it_vbak-vbeln.
MOVE-CORRESPONDING it_vbep to IT_VBEPVB.
append it_VBEPVB.
ENDLOOP.
CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
EXPORTING
fbeleg = it_vbap-vbeln
fposnr = it_vbap-Posnr
* FVERRECHNUNG = ' '
* FS073_ALT = ' '
* IF_NO_SORT = ' '
tables
fvbfa = it_vbfa
fvbup = it_vbup
fxvbep = it_VBEPVB
* FVBLB =
fvbap = it_VBAPVB
EXCEPTIONS
FEHLER_BEI_LESEN_FVBUP = 1
FEHLER_BEI_LESEN_FXVBEP = 2
OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT it_VBEPVB WHERE POSNR = IT_VBAP-POSNR.
IT_FINAL-KWMENG_d = IT_FINAL-KWMENG_d + it_VBEPVB-VSMNG. " COMPUTE DELIVERY QTY
ENDLOOP. -
How to Move file / call UNIX command using ABAP Program
Hi, ABAP Guru.
I need to Cut & Paste file (Move file from one location to another location) on Network Shared Drive using ABAP program.
But I can't figured out how to do this and what ABAP Command / FM / Method (and maybe UNIX command) that being used.
Please give me the advice.
Best regard and Thank you all.
Nattapash C.all methods for your requirements should be in class CL_GUI_FRONTEND_SERVICES
-
Cannot get encoding correct using ABAP XML
I need to transform data using ABAP transforms and the DOM.
I'm expecting to get a string like this out of the DOM tree when I call IF_IXML_NODE->GET_VALUE( ):
Jukan testityö
Instead I get:
Jukan testityA¶
(This is finnish).
The inbound XML is UTF-8 encoded, and the text is fine when browsing.
I have two issues:
1) When I call CALL TRANSFORM and my xslt code has <xsl:output encoding="utf-8"/>, it works with the XSLT_TOOL in test mode and sets the encoding for the transformed XML as UTF-8. However, when I call CALL TRANSFORM in the program, the encoding of the transformed file is "iso-8859-1". I cannot change the encoding, even if using CALL TRANSFORMATION with OPTIONS xml_header = 'full'. How can I do that?
I have tried to use the SET_ENCODING methods of the if_ixml_istream and if_ixml_document objects like this:
l_encoding = l_ixml->create_encoding( byte_order ='1', character:_set = 'utf-8' ).
l_istream->set_encoding( encoding = l_encoding ).
and this still does not work.
Any idea how I can correctly render my xml to correctly display finnish characters?
BR,
Tony.Ever managed to get this done?
Tried "UTF-8" in capitals?
Ciao
Alex -
Reading email using abap program
Hi All,
I have a requirement to read inbox mails through abap program.
Also from address, to address, subject.
Could someone help me !!
Thanks in advance,
Venkat
Moderator message : Requirements dumping not allowed, show the work you have already done. Thread locked.
Edited by: Vinod Kumar on Jan 30, 2012 11:37 AMHi,
Please find below the tables if you are usinG BI 7.0
For 3.5 also they are almost similar...
Getting Details regarding DSO
1) RSDODSO
2) RSDODSOT
3) RSDODSOIOBJ
4) RSDODSOATRNAV
Getting Details regarding InfoObjects
5) RSDIOBJ
6) RSDIOBJT
Getting Details regarding DataSource
7) RSDSSEG
8) RSDS
9) RSDST
10) RSDSSEGFD
Getting Details regarding Transformation
11) RSTRAN
12) RSTRANFIELD
13) RSTRANRULE
Getting Details regarding InfoCube
14) RSDDIME
15) RSDCUBE
16) RSDCUBEIOBJ
17) RSDDIMEIOBJ
18) RSDCUBET
19) RSDDIMET
Getting Details regarding MultiProvider
20) RSDCUBEMULTI
21) RSDICMULTIIOBJ
Getting Details regarding Queries
22) RSREPDIR
23) RSZELTTXT
Based on the above tables ,we can write our own generic program based on your needs.....
These tables help you a lot in order to achieve that.
Regards
vamsi -
How to schedule a Process Chain using ABAP Program?
Hi All,
I want to schedule the activity of extracting data from the query to a flatfile.
Currently we are schedulling it using the transaction rscrm_bapi.
I need to know , how we can achieve the same using an abap program and not ( rscrm_bapi) in a process chain.
Any help would be appreciated.
Regards
PurvaYour problem will be solved if you use the Function Module "RSPC_API_CHAIN_GET_STATUS" instead of the function module "RSPC_API_CHAIN_GET_LOG".
The function module "RSPC_API_CHAIN_GET_STATUS" gives you the STatus of the process chain, when you pass the Chain Name and the Log ID.
If you get an output
G or F - Report that the Chain is Successfully Completed.
A - The chain is Currently running
R or X - Report that the chain has ended with Errors.
Sample code :
REPORT Z_BW_GET_STATUS_PROZESSKETTE.
TABLES rspclogchain.
DATA: gt_rspclogchain LIKE rspclogchain OCCURS 0,
wa_rspclogchain LIKE rspclogchain.
DATA: gt_log LIKE rspc_s_msg OCCURS 0,
wa_log LIKE rspc_s_msg,
gt_status like RSPC_STATE.
SELECT * FROM rspclogchain
INTO CORRESPONDING FIELDS OF TABLE gt_rspclogchain
WHERE datum = sy-datum
AND chain_id = 'BD_C02_1D'.
IF sy-subrc = 0.
SORT gt_rspclogchain BY datum DESCENDING
zeit DESCENDING.
READ TABLE gt_rspclogchain
INTO wa_rspclogchain INDEX 1.
CALL FUNCTION 'RSPC_API_CHAIN_GET_STATUS'
EXPORTING
i_chain = wa_rspclogchain-chain_id
i_logid = wa_rspclogchain-log_id
IMPORTING
E_STATUS = gt_status.
IF gt_status = 'G' or gt_status = 'F'.
WRITE :/ 'BD_C02_2D chain COMPLETED'.
ELSE.
WRITE :/ 'BD_CO2_2D chain is Running or Ended with Errors'.
ENDIF.
ELSE.
WRITE :/ 'No chain BD_C02_2D started for today ! or keine Kette BD_C02_2D gestartet !'.
ENDIF.
I have just provided a sample code, you might have to edit or add necessary messages to the program.
Regards,
Ramya
Maybe you are looking for
-
E-recruitment 600 URL/BSP Initial set up - Standalone Test system(ECC 6.0)
Dearest experts At the very cusp of setting e-recruitment up. I have followed SAP note 890357 min configuration..... The BSP for e-recruit upon test via Transaction SICF do not work, apart from the odd one EG. hrrcf_emp_page URL's error when created
-
How can I restore the sound in my iPad after using my head phones in it?
I have lost sound on my iPad after taking out the earphones. Please tell me anything I can do to restore that. This is the second time it has happened. I cannot figure it out. The keys on my keyboard don't click nor the sounds on games. Thanks
-
New Hard Drive doesn't show on MBP - faulty drive?
Hi I've tried to replace the hard-drive on my mbp 13" after having problems with the old drive. Basically, although the old hard-drive was visible I couldn't unmount it and guy at Apple genius bar said I'd need a new one. Bought a Samsung M7 500GB 2.
-
Help me please~ non-static variable rs cannot be referenced ...
i make counter but this error occurrence only i doing resultset make and closed why non-static variable rs .... i am sorry i don't speak English ... help me please.. error message non-static variable rs cannot be referenced from a static context sour
-
Updating sniffer code link in Template
I have a horizontal CSS menu in a DW template that requires a bit of sniffer code to work properly in IE Below is the code in the template: <!--[if lt IE 8]> <style type="text/css" media="screen"> #menuh{float:none;} body{behavior:url(../ebs/csshover