I want to get output of Transaction FPO4 in a caller Zprogram, can anyone help in achieving the same. Appreciate sample code
Output of FPO4 in caller program
Transaction called through CRM Web UI.
Hi All,
I have a very strange problem though it might have some reasons which i don't know.
I have a Z-transaction associated with a screen which calls a standard FM which has a COMMIT WORK statement as follows.
IF X_COMMIT IS NOT INITIAL.
---->COMMIT WORK.
ENDIF.
Now if i execute the transaction from SAP system it works fine meaning that it passes the control to the next statement after executing the COMMIT WORK statement.
If I put a break point and execute the same transaction from CRM WEB UI a problem is occuring. The control comes to the COMMIT WORK statement commits work by executing some code relevant for saving the work which is fine. But now the control will not (which should) to the next statement just after the COMMIT WORK. It looks like it stops the execution of current program and calls a screen to come back to the first screen in CRM WEB UI from where we executed. Because of this the remaining code which must be executed is not executing.
Kindly Help....
thanks,
Aswatha Narayana SA.
Output of FPO4 in caller program
I want to get output of Transaction FPO4 in a caller Zprogram, can anyone help in achieving the same. Appreciate sample code.
Re: how to write code without select's in loop statement ?
Hi daniel,
Try the following updated code,
data: begin of it_ekpo occurs 10.
data: ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
banfn like ekpo-banfn,
bnfpo like ekpo-bnfpo.
data: end of it_ekpo.
data: begin of it_eban occurs 10.
data: banfn like eban-banfn,
bnfpo like eban-bnfpo,
estkz like eban-estkz.
data: end of it_eban.
Select ebeln
ebelp
banfn
bnfpo
from ekpo
into table it_ekpo "(internal table for EKPO)
for all entries in c_t_data
where ebeln eq c_t_data-ebeln
and ebelp eq c_t_data-ebelp.
if not it_ekpo[] is initial.
Select banfn
bnfpo
estkz from eban
into table it_eban "(internal table for EBAN)
for all entries in it_ekpo
where banfn eq it_ekpo-banfn
and bnfpo eq it_ekpo-bnfpo.
endif.
loop at c_t_data into
l_MC02M_0ITM.
read table it_ekpo with key ebeln = l_MC02M_0ITM-ebeln
ebelp = l_MC02M_0ITM-ebelp.
if sy-subrc eq 0.
read table it_eban with key banfn = it_ekpo-banfn
bnfpo = it_ekpo-bnfpo .
if sy-subrc eq 0.
l_MC02M_0ITM-zzestkz = it_eban-ESTKZ.
endif.
endif.
Modify c_t_data FROM l_MC02M_0ITM.
endloop.
Re: BAPI : BAPI_CONTRACT_CREATE problem for conditions upload
Hi Vaman,
Try passing the data to ITEM_COND_VALIDITY. You need to pass the line item number and validity period for the line item conditions. This table sets the validity period for the conditions, Hope this helps.
Cheers
~Niranjan
Re: how to code ..simple if loop statement ?
thanks for the compliment..you can ask me if you have any questions regarding ABAP queries...Incase if i am not available in SDN you can send me mail @rameshkrishnamani@gmail.com.
Regards,
Ramesh.
Re: BAPI : BAPI_CONTRACT_CREATE problem for conditions upload
Hi,
Please check this note:1361019
Regards,
Madhu.
Re: Help!!! I Have a strong Problem
Hi,
Did you check the configuration.
Regards,
Madhu.
Re: Add new field in QA11
Hi Taraknath,
Thanks. I already tried the Userexit QPL10004 . I added the new field in the screen exit but the field is not appearing in QA11 but this field is appearing in QA02/QA03 etc.
Please advise the steps how to get the screen field in QA11/QA12 transaction so that User can enter something before saving.
Thanks
Pabi
Re: how to write code without select's in loop statement ?
Hi Tushar,
THanks for the update. I have tried your code, corrected syntax errors. and I am getting an error....
"The specified type has no structure and therefore no component called EBELN "
Its shwoing at
Read table it_ekpo with key ebeln = l_MC02M_0ITM-ebeln
ebelp = l_MC02M_0ITM-ebelp.
Can you please suggest.
Thanks,
DR
Re: changing the field of an internal table
Hi Rahul,
IT_DATA should be declared as :
IT_data type TABLE of lfa1,
Similarly for T_DATA as :
T_DATA type TABLE of lfa1.
Hope it helps.
Thanks
Re: Which Variants are being used in reports
Hi Barbara,
In the table VARID enter the program name to list all the variant that is been used by the program and then go to the function module RS_VARIANT_CONTENTS and enter the program name and variant........you will get details of that variants.
thanks and regards,
narayan
Re: Internal table Usage problem in ABAP ...
Hi Edgar,
I'm not an expert in Logistic, hence I am not sure if this is a user exit, so correct me if I am wrong, KUNNR is a customer number that contains 8 characters. Her constant is a 2 character field, hence I sort of thinking she is trying to group up all customer that have a prefix code of AG. Hence where the loop kicks in.
If she just want 1 record, then ya...read will be a better option.
Another thing I picked up from her reply as well, the error is with XVBPA, but when you look how she code the read statement:
READ TABLE int_xvbpa INTO ws_int_xvbpa WITH TABLE KEY kunnr = lc_ag.
So there is definately something wrong with the code that don't match the print screen. Can't really help much without seeing the whole code though.
Best regards,
Brian
No Limit Flag
Hi Guru s,
I have an requirement. My requirement is
Ø The flag “NO limit” must be un-ticked for all PO with document type MISC, even PO is created with reference to other existing PO/PR and on which flag “No limit” is ticked.
Ø Now setting for flag “No Limit” is in display mode for (ME21N, ME22N and ME23N) for document type MISC. i have to use userexit to get above mentioned requirement. Can any one please tell me which exit is suitable to full fill this.
t Thanks in advance
ca
ca
Re: Internal table Usage problem in ABAP ...
Yep, it's indeed another good point (noticed that but didn't care about, my mistake...), customer numbers doesn't look like that AG that actually I started to guess is the partner type.
Re: BAPI_ACC_DOCUMENT_POST extra tax line in bset + maybe wrong values?
1.
BAPI_ACC_DOCUMENT_POST internally do a call transaction to FB01. You debug your program and put a break point on statement CALL TRANSACTION. Now check the posting in foreground mode. ( Change value to A from N). There look at tax line posting. I think you will get some clue.
2.
Some times extra lines comes in BSET with zero tax amount if there any zero tax rate maintain in FTXP.
3. If you does not get any clue from the other two step, you can try to post the document manually from FB01 with the same data and see the BSET table.
Thanks
Subhankar
Upgrade related
Hi,
Its related to ABAP remediation in UPGRADE project.
How to solve this issue?
The ERROR is as follows........
The offset and length fields in the token table are not filled until the "WITH ANALYSIS" is declared.
The token table should use STOKES or STOKEN as the line type, for space reasons.
Thanks..
Re: getting a list of files from the application server
Hi,
I am little bit confused with your question.
You can use the FM RZL_READ_DIR_LOCAL to get all the files (name and path) are in a directory.
To read the content of each file you have to use OPEN DATASET.
Thanks
Subhankar
Re: Transaction called through CRM Web UI.
Hi,
Not sure why it happens, but try out these things if it works.
- Press F6 on COMMIT WORK, so it will do commit in one go and will go to next statement in your program.
- Try COMMIT WORK AND WAIT. You must have idea that COMMIT WORK starts work in new thread and actually our code keeps executing with COMMIT (in normal execution).
If COMMIT WORK AND WAIT is used, our code stops executing until COMMIT WORK is completed.
I guess in debugging, COMMIT WORK statement goes in debugging so control is lost in our code (not sure if this is correct but looks so)
Thanks,
Murtuza
Error when importing object "XPOEXT"
Hi Experts,
We are getting dumps in ECC system with following information.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLEINU" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
This exception cannot be caught in the context of the current statement.
The reason for the exception is:
When attempting to import data, the
structure of the complex object "XPOEXT" was not compatible with the
target object. The error occurred with component no. 5.
How to correct the error
Try to find out why the structure of the object is incorrect.
There are various possible options:
1. The structure of the imported object has changed in the Data
Dictionary. Make sure that the structure of the imported object
matches the structure of the object in the Data Dictionary.
If the data cannot be restored from another source, the data must be
read by the 'old' structure, converted und again eported with the new
structure, so that future IMPORTs will always function with the new
structure.
2. A new program version is active, which no longer fits the dataset.
Try to solve the error generating the program "SAPLEINU" again. This
works as follows: Select transaction SE38 in the SAP system. Enter
the program name "SAPLEINU". Then activate the function 'Generate'.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"CONNE_IMPORT_WRONG_STRUCTURE" " "
"SAPLEINU" or "LEINUU05"
But i am not able to understand this comment:
structure of the complex object "XPOEXT" was not compatible with the
target object. The error occurred with component no. 5.
May i know what shall i do to correct this error.
Thanks All.