cancel
Showing results for 
Search instead for 
Did you mean: 

Invoking BAPI_DOCUMENT_CHECKIN2 from WebDynpro doesn't work

ged_hurst
Participant
0 Kudos

Hello everyone,

I've coded this:


METHOD check_in_attachments.

  CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
          EXPORTING: documenttype = dokar
                     documentnumber = doknr
                     documentpart = doktl
                     documentversion = dokvr
                     PF_HTTP_DEST = 'SAPHTTP'
                     PF_FTP_DEST = 'SAPFTP'
          IMPORTING: return = return
          TABLES: documentfiles = documentfiles.

  IF return-type CA 'EA'.
    ROLLBACK WORK.
  ELSE.
    COMMIT WORK.
  ENDIF.


ENDMETHOD.

and I'm calling this method from my webdynpro for ABAP program but I'm getting the error:


Error while checking in and storing: c:\myfile.txt 

When I invoke the same method from a report it works all right.

The destinations SAPHTTP and SAPFTP are working okay (report RSHTTP05 ).

Could any one help me on this?

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I dont have an idea about this fm. But I think so it uses gui screens or something else like that. If it is true you can not use this fm in WDA.

ged_hurst
Participant
0 Kudos

Should I move the question to the DMS section then?

Former Member
0 Kudos

You are trying to get a file from your computer on "C" drive?

ged_hurst
Participant
0 Kudos

Yes,

but it all works if the code above is invoked within a report.

There must be something strange when invoked from WebDynpro. So I guess it's a WebDypnro related problem.

The destinations SAPHTTP and SAPFTP are created correctly (and test is successful).

Former Member
0 Kudos

But it works in SAP GUI, so it can access your pc. But in WDA it works on your web browser. So you have to find another way.