‎2009 Nov 13 5:30 AM
Hi,
I have developed the BAPI which gets the data from few tables and puts them in one structure. But when I am running I am not getting the output. When I am debugging the same the structure is getting populated but it is not getting returned. Please let me know what could be the issue.
Regards,
Ashutosh
‎2009 Nov 13 5:40 AM
hello ,
make sure u have mapped output tables properly.
regards
Prabhu
‎2009 Nov 13 5:45 AM
Hi,
Could you please tell me which BAPI you are using?
Regards,
Rahul
‎2009 Nov 13 6:09 AM
Hi,
Its custom BAPI. The only thing I want to know is how to debug and find the problem once it has passed the code written by me and goes to the standard code. I am not able to find out from where in the code it gets returned.
‎2009 Nov 13 6:25 AM
wat is the sy-subrc value after the bapi is called.
u can try by chkin the condition if sy-subrc <> 0. display the message num, id and text.
‎2009 Nov 13 6:27 AM
hi,
may be you are not appending structure..........
the data is coming to structure na, once check you are appending that data or not.
Regards,
Arjun.
‎2009 Nov 14 11:54 AM
Hi,
This is the code that I have written in the source code section.
SELECT SINGLE NAME1 FROM KNA1 INTO KNKKTAB-NAME1 WHERE KUNNR = KUNNR .
endselect.
SELECT SINGLE WAERS FROM KNVV INTO KNKKTAB-WAERS WHERE KUNNR = KUNNR
.
endselect.
SELECT SINGLE KLIMK SKFOR FROM KNKK INTO
(KNKKTAB-KLIMK, KNKKTAB-SKFOR)
CORRESPONDING FIELDS OF KNKKTAB
WHERE KUNNR = KUNNR.
endselect.
KNKKTAB-CSKFOR = ( KNKKTAB-SKFOR / KNKKTAB-KLIMK ) * 100.
APPEND KNKKTAB.
KNKKTAB is the structure that I am using which contains NAME1 WAERS KLIMK SKFOR CSKFOR fields. Please let me know what could be the reason.
‎2009 Nov 14 11:58 AM
if this is only the code you have then there is no faults in your code.
Check whether you have cleared the internal table body at the end.
Donot test your bapi from your program instead run it independently in SE37 and test.
Can you please list your BAPI signatures
‎2009 Nov 14 12:23 PM
Dear Aushutosh ,
Please check whether You have created structure of table in which you are taking values
Do as Such
Create Structure
through se11
Data Type : zname .
having field which you required
such as
name1
waers
klimk
skfor
cskfor
Then assign this Structure to your RFC i.e BAPi
in TAbles Tab
such as
Result like zname .
and then you use your code
to append data in result table
whit proper import parameter and Export parameter if any .
Regards
Deepak .
‎2009 Nov 14 2:22 PM
Hi ashutosh,
your question may be andwered considerably faster if you give full details from beginning:
How and from where is you BAPI called (BAPIS are only BAPIS if there is a BOR object!)?
What interface parameters of what type do you use?
You may post relevant code as code using the above <_> code button
after selecting the code with the mouse.Regards,
Clemens
‎2009 Nov 14 2:34 PM
Hi,
Not sufficient info to help you out.
Please thoroughly debug, that would be the suggestion.
As Clemens suggested, paste appropriate portions of code so that we can look through and help.
Check it you have accidentally cleared the internal tables after populating your ouput rows.