cancel
Showing results for 
Search instead for 
Did you mean: 

Scanning PO barcode details from SAP

GowthamRaja
Participant
0 Kudos
Hi Experts,
I have done a task to scan the barcode using mobile camera as per the link

http://stackoverflow.com/questions/4443891/how-to-read-barcodes-with-the-camera-on-android/14097922#...

and the codings in the above said link is,

package com.example.BarcodeTest;

//import android.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.example.camera.R;
public class BarcodeTest extends Activity {

Button captureButton;

TextView tvContents;
TextView tvFormat;

Activity activity;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_barcode_test);

activity = this;

captureButton = (Button)findViewById(R.id.capture);
captureButton.setOnClickListener(listener);

tvContents = (TextView)findViewById(R.id.tvContents);
tvFormat = (TextView)findViewById(R.id.tvFormat);

}

public void onActivityResult(int requestCode, int resultCode, Intent intent) { 
  switch (requestCode) {
  case IntentIntegrator.REQUEST_CODE:
     if (resultCode == Activity.RESULT_OK) {

        IntentResult intentResult =
           IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);

        if (intentResult != null) {

           String contents = intentResult.getContents();
           String format = intentResult.getFormatName();

           tvContents.setText(contents.toString());
           tvFormat.setText(format.toString());

           //this.elemQuery.setText(contents);
           //this.resume = false;
           Log.d("SEARCH_EAN", "OK, EAN: " + contents + ", FORMAT: " + format);
        } else {
           Log.e("SEARCH_EAN", "IntentResult je NULL!");
        }
     } else if (resultCode == Activity.RESULT_CANCELED) {
        Log.e("SEARCH_EAN", "CANCEL");
     }
  }
}


private View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View v) {
     IntentIntegrator integrator = new IntentIntegrator(activity);
     integrator.initiateScan(activity);
}
};
}



my question is: how to get the details of barcode from SAP System. i.e while scanning the barcode the number below is the PO number and we have to get the details of the PO.
Kindly help me on this. Awaiting for your replies. Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

fenil_doshi
Participant
0 Kudos

Hi Raja,

          I have also the same requirements but I have a doubt that as in android native app we have libraries which we implement that in the application so as the barcodes which are generated from the SAP system which we have to scan from the device supports only the standard or some sets of barcode which are pre defined by the libarary and so how exactly we are going to scan the barcode which is independently generated from the system ?

Regards,

Fenil Doshi.

midhun_vp
Active Contributor
0 Kudos

Fenil, I don't understand your question completely.

The libraries which using are talking about is independent of SAP. We use these libraries to scan the and get the value. After scanning we will be able to process the scanned value. The value can be a numbers of some codes, that can be send to SAP or can be used to do some tasks. So where you are stuck in this ?

- Midhun VP

fenil_doshi
Participant
0 Kudos

Hi Midhun,

               Thanks for your reply you are right that we will scan the barcode and then proccess it but as there are various types of barcodes available in the system which are of various types like EAN,UPC,etc....  and out of all the available types some are supported in the libraries which is implemented in the front end as per the target device OS and that type of barcodes will only be scanned and not all the barcodes which are generated by the system So as if you have implemented the barcode scanning where which type of barcode you had scanned from the device and was it IOS or Android ?

Regards,

Fenil Doshi.

midhun_vp
Active Contributor
0 Kudos

Firstly, you have to decide what type of barcodes you are targeting. In the case of android we can make use of existing barcode reader apps in our project to read the barcodes. If you are planning to use this app in multiple platforms like ios android or BB you can check which are are types of bar codes these platforms are supported (I hope most types of bar codes are well supported in these). I had used QR and barcode in android platform. I think it must be supported in other mobile OS too.

- Midhun VP

fenil_doshi
Participant
0 Kudos

Hi Midhun,

               Thanks for your reply so you had used QR codes and as per the scanned code or let's say a string it will fetch you details from the backend.I will also try this and if any doubt will post a thread.Thanks Midhun for your answer.

Regards,

Fenil Doshi.